1
Network / Receiving packets: while(socket.receive()...) vs. if(socket.receive()...)
« on: December 01, 2018, 10:04:11 am »
I was experiencing some issues in my current project with latency delays while testing locally. Then I came upon this thread, specifically this message:
https://en.sfml-dev.org/forums/index.php?topic=12011.msg91201#msg91201
Changing my if's to while's fixed it. I was just wondering why it made such a huge difference. Is this a bug, or is there an intentional reason/explanation for why this occurs?
Thanks!
https://en.sfml-dev.org/forums/index.php?topic=12011.msg91201#msg91201
Changing my if's to while's fixed it. I was just wondering why it made such a huge difference. Is this a bug, or is there an intentional reason/explanation for why this occurs?
Thanks!