FTcpSocketBuilder AsNonBlocking not working

Hi,

I succeeded to setup a TCP connection with my server , its working great !

But i felt disappointed about the Connect step. Indeed , when the IP/Port are correct , the connection is established at once . But , when the IP is wrong or the server is shutdown , the editor freeze at least 30 sec then the log (that says i can’t connect) shows up.

I finally found the problem : FTcpSocketBuilder(“SOCKETNAME”).AsNonBlocking().Build() was not setting the socket AsNonBlocking.

I had to add “TCPSocket->SetNonBlocking(true);” in order to make it work so the editor doesn’t freeze anymore when the server is shutdown.

Is that a bug or was i doing that wrong ?

Plateform : OSX Yosemite, Editor 4.8.1

Well , i was so glad my editor didn’t freeze anymore when the server is shutdown that i didn’t test when the server is alive… and TCPSocket->SetNonBlocking(true) made it impossible to connect …

I change the way i create the socket by doing :
TCPSocket = ISocketSubsystem::Get(PLATFORM_SOCKETSUBSYSTEM)->CreateSocket(NAME_Stream, TEXT(“default”), false);

And now its working flawlessly !

I still don’t understand why what i did was wrong so i let this post up as that sound buggy for me.

That was a bug in the TcpSocketBuilder. Fixed in GitHub commit, thanks!