UDP Block?
Hey guys, I need people to guess the solution: (.
I am using UDP sockets and what I am doing is sending the player input which is around 8, 4, or any bytes. I am using recvfrom and sendto. It runs for a few minutes and then randomly blocks. However, it might be related to my application logic, but I want to know if anyone has any experience with this and this is a UDP / Networking issue. My code is here http://www.pastie.org/486583 , but I basically want to know what I can study to fix this issue based on your impressions.
Does the GetInput () function expect sendTo and recvFrom to always complete? UDP does not guarantee that your messages will be sent or received, or in what order the messages will arrive. I think your timeouts are also set to infinity, so that happens from time to time, the message fails and you can wait indefinitely for a message that is already lost.
a source to share