Make sure that you are reading in "all available packets" each loop, rather than only reading one.
--Dave
How often should you send updates?
Alright, I replaced:
Btw.: Since I'm using RakNet, I don't think it would be a good idea to implement send/receive as threads.
if(packet=client->Receive()){ //Update }
with:while(packet=client->Receive()){ //Update }
Now my older PC can play as well. I also don't have to limit the number of packets anymore. Thanks guys!Btw.: Since I'm using RakNet, I don't think it would be a good idea to implement send/receive as threads.
Quote:
RakNet FAQ
I want to, or should I call Send and Receive from multiple threads.
Those functions are not currently threadsafe. There is no benefit to calling them from threads, as they are already optimized to run asynchronously with the main network thread.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement