Why does UE4 always miss the first packet?

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:

  1. When you press button in first time you send date on the server and invoke the code for receiving. But server may be ( if we take into account ping) not catch you message and not done responce, when you try receive one.
  2. while (mySocket->HasPendingData(Size)) this code only check that the socket has any pending data on the queue and how I think the socket hasn’t pending data yet.
  3. When you press button again socket already have data and you handled them successfully.

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: A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums

P.S. Hi from broly… :wink: