Low Entry Plugins

My bad, too sleepy. It works this way.

Ah good, I’ll try to find out why this is even needed in 4.12, since it should have been fixed since 4.11.

I’ll let you know if I find anything.

Thank you, looking forward to this
I may install 4.11 later tomorrow to test this.

The library has been updated today.

The updated 4.12.5 build can be found here: https://dl.dropboxusercontent.com/u/7174774/shares/other/LowEntryExtStdLib_4-12-5_2016-07-08.zip

Here is the log. Android phone connected with H+ network.

I don’t understand, it seems like your client opens a lot of connections at once, which are all discarded as well, except for one, which seem to work just fine.

The new connections are already being opened even after the previous connections haven’t even disconnected yet.

Perhaps check your client-side code to maker certain connections aren’t being opened incorrectly, which seems to be the case here.

I’ve added a new blueprint that will make it easier to re-listen to a socket connection.

The blueprint will automatically check if the socket connection is valid and connected, and if so, it will stop all other blueprints (like the Connect blueprint) from ticking the socket connection, and then it will start ticking the socket connection itself.
This blueprint should basically be called whenever the level changes (I call it from my PlayerController’s BeginPlay for example, which might not be the best place, but in my game there will always only be one PlayerController so yeah).

The update also fixed a bug where Connect blueprints would sometimes stop prematurely and then return false, even though the connection is successful several ticks later.
Usually this is caused by calling Connect twice on the same socket connection, so it shouldn’t happen if you did everything correctly, but still, I’ve added code to deal with it anyway.

The update has been sent to Epic, so now we’ll just have to wait.

Edit: The update is now live, the new blueprint is called “Re-listen”.

Thanks for the update on that Relisten node :slight_smile:

But I think I am having the same issue as SalihBalkan now.
On localhost the connection is always successful.
But when I tried to launch client on different machine (on the same network over wifi and also on friend’s pc), connect node returned false right after “[DEBUG] Client has connected” message. Some time later my server told me that the client was disconnected because the handshake took too long.

Oddly, it connected successfully on the third try (each time I reopened the client and tried to connect):

Oh and by the way, I planted a lot of breakpoints in .ue4.classes.sockets.SocketServerClientHandler#receivedData to watch the handshake process and it seems that remote client did not send any data (when it failed to handshake).

Weird. My guess would be port forwarding problems, I had weird problems as well until I uploaded and ran the server on a digital ocean droplet, then everything worked fine for me.

The updated socket connection plugin should give warnings now if anything went wrong on the client side, do you see any warnings in the UE4 output logs?

In game log it only says that SendBufferSize changed to 5242880 and ReceiveBufferSize changed to 5242880. Do I need Editor to be open to see warnigs?

No I don’t thing so, it seems like there just aren’t any warnings.

Does Connect return true?

By the way, what platform and what UE4 version are you experiencing this with? I was thinking, maybe it doesn’t flush well on certain platforms, that could also cause this.

Nope, “Success” is false. I know that because I put a debug message on false and it fires immidiately.

Windows 10, latest version from Launcher (4.12.5).

I’ll try to run server on my VDS then.

Hm, it now seems to me that the problem lies in the Connect node, since it should be returning true.

What if you add a delay of 1 sec or so after the Connect node, and then call Re-listen?

This did not work. And placing server to my vds did not work too :frowning:

Da mn, I’m really starting to run out of ideas. Maybe, somehow, the server doesn’t recognize the handshake. What happens if you send 10 kilobytes of data (or more)?

There were no handshake at all. I set breakpoints in SocketServerClientHandler#receivedData on handshake stages and they fired only when connection was successful (from the same machine and rarely from remote one).

Also wireshark data:


first 3 are connect, last 2 are disconnect after 15 seconds.

I should dig into the internal UE4 socket code to see what is going on exactly. It seems like the client side just assumes the connection has failed for no good reason.

I do wonder if this also happens when connecting to other servers, or when other clients connect to the server.

What happens when you make a websocket client (disable TLS) connect to your server? Does it handshake?

When I disable TLS it wont connect at all. Nothing happens.
When TLS enabled, it does connect but disconnects due to handshake taking too long.

EDIT: ok that was because the page was https://
when I changed this to http, this happened:

So I guess everything is ok with server?

It seems so, the problem most likely lies in the client code.

You could test out the client by connecting to a HTTP server, the server will probably disconnect you immediately because the header sent will be

, but it should connect, and the Connect blueprint should return true. If that doesn’t happen, there is probably something wrong with the client socket code.

If I understand you correctly…


this also fails; connect blueprint returns false

Meanwhile in packet sniffer I see the tcp handshake (syn ack) with google IP.

Are you able to reproduce this problem?

p;s have to go, I’ll be back in several hours