1
Network / Re: Receiving packets: while(socket.receive()...) vs. if(socket.receive()...)
« on: December 01, 2018, 07:07:35 pm »With 'if' you only process one packet. If there are several waiting (in the system buffer) then they'll have to wait until the next few iterations of your game loop -- yes, this is latency
Thank you very much, that clears things up!
Things appear to work when I test things with two instances of the GCC-compiled executables. However, when I try it with two MSVC-compiled executables, there is a significant delay in the packet sending. Interestingly enough, it also works if I try a MSVC host and a GCC client, but the other way around still lags. It's the exact same code, so I'm assuming MSVC is doing something non-standard. Are there any known quirks that would explain the discrepancy in behaviour between these two executables?
Edit: nevermind, I have found the issue. Thank you again for your time!