# FSocket::GetConnectionState return "Connected" after \*just\* created

**URL:** <https://forums.unrealengine.com/t/fsocket-getconnectionstate-return-connected-after-just-created/381425>\
**Category:** Mobile\
**Tags:** fsocket, unreal-engine, Android, question, CPP\
**Created:** [January 10, 2017, 7:49am UTC](https://forums.unrealengine.com/t/fsocket-getconnectionstate-return-connected-after-just-created/381425 "2017-01-10T07:49:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_684f066a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_684f066a](https://forums.unrealengine.com/u/anonymous_user_684f066a)\
**Post date:** [January 10, 2017, 7:49am UTC](https://forums.unrealengine.com/t/fsocket-getconnectionstate-return-connected-after-just-created/381425/1 "2017-01-10T07:49:17Z")

</div>

I created the FSocket instance like below:

```
FSocket* Socket_;
Socket_ = ISocketSubsystem::Get(PLATFORM_SOCKETSUBSYSTEM)->CreateSocket(NAME_Stream, TEXT("TestSocket"), false);

```

and I tried to get the state of socket like below:

```
ESocketConnectionState CurrentStatus = Socket_->GetConnectionState();

```

It works fine at PIE. Editor. It returns ESocketConnectionState::SCS\_NotConnected  
but when it runs on android device, It returns ESocketConnectionState::SCS\_Connected.

Does anyone have similar experience like this? I’m confusing what I did wrong with Socket initialization.  
Why the result is different between Editor and Android device?
