Hi,
Thanks for this example code! I tried it and it works well, but when I tried to send the message from the client to the server every update step (60 Hz), then I get that around 10-40% of the messages arrive in the server simultaneously (the callback OnDataReceived is called twice, with 0 ms or 1 ms between each call - I checked this using a stopwatch). So one receives one message, then one should expect a message 1/60 ms later, but what happens is that no message arrives, and then in the next step two messages arrive. I tried also to send every second update step, and then you dont get messages arriving simultaneously, but instead you get 10-30% of the packets arriving with latency >36 ms.
Have you experienced this behavior and do you have any suggestion on how one could achieve a transmission between client and server at 60 Hz?
Running Windows 10 and Unity 2018.2.15f1, and the client and server are communicating inside the same machine, as in your example.
Thanks for the help!
Hi,
Thanks for this example code! I tried it and it works well, but when I tried to send the message from the client to the server every update step (60 Hz), then I get that around 10-40% of the messages arrive in the server simultaneously (the callback OnDataReceived is called twice, with 0 ms or 1 ms between each call - I checked this using a stopwatch). So one receives one message, then one should expect a message 1/60 ms later, but what happens is that no message arrives, and then in the next step two messages arrive. I tried also to send every second update step, and then you dont get messages arriving simultaneously, but instead you get 10-30% of the packets arriving with latency >36 ms.
Have you experienced this behavior and do you have any suggestion on how one could achieve a transmission between client and server at 60 Hz?
Running Windows 10 and Unity 2018.2.15f1, and the client and server are communicating inside the same machine, as in your example.
Thanks for the help!