Why does UE4 always miss the first packet?
I press a button, and it sends a packet, containing a string data "Hello" to my server.
My C# server receives it, and then sends it back to the client (UE4).
My UE4 doesn't get the packet.
I press the button the second time,
Server gets it, and now client gets it. And so on.
Why does the client miss the first one?
It's bad, because if my players type in the correct password and username the first time, the server will say that's right, but the client will not receive, until the player presses the button the second time.
asked Mar 21 '16 at 10:33 PM in C++ Programming
Hi! How exactly do you invoke this code? I think problem in that you don't wait when data come from server, so I mean following:
So I advice for you try check socket several times in timer. But it not so good solution if you would like use socket many times. It this way I suggest use more general solution like this: https://wiki.unrealengine.com/TCP_Socket_Listener,_Receive_Binary_Data_From_an_IP/Port_Into_UE4,_(Full_Code_Sample)
P.S. Hi from broly... ;-)
answered Mar 23 '16 at 05:18 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here