Archived

This topic is now archived and is closed to further replies.

UDP vs. TCP

This topic is 6363 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I know that TCP involves establishing a connection between the two computers, and what is sent is pretty much guaranteed to be received at the other end. So what is the advantage in using UDP packets in multiplayer games which are unreliable? Does TCP require more bandwidth for error checking and acknowledgement etc.? Douglas Cowan

Share this post


Link to post
Share on other sites
TCP requires acknowledment for every message sent. This is slower than UDP (also called reliable). UDP sends a message - if it gets there it gets there if not oh well. This is probably twice as fast as TCP.(No acknowledgment) also called unreliable. TCP does not require more bandwidth, just an entire extra acknowledgment message.

Also, most action network games will send update messages at some time interval...say every 50ms. If a message is lost, then the next message will carry the needed information anyway.

In short, the reliable TCP is slower and unneeded for most games, since they are updating very frequently anyway.

Share this post


Link to post
Share on other sites