UDP and TCP: Comparison of Transport Protocols

Share

You have most likely heard of sockets, and are probably aware that there are two main types: TCP and UDP. When writing a network game, we first need to choose what type of socket to use. Do we use TCP sockets, UDP sockets or a mixture of both?

UDP ( User Datagram Protocol )

No guarantee of reliability or ordering of packets, they may arrive out of order, be duplicated, or not arrive at all!

You have to manually break your data up into packets and send them

You have to make sure you don’t send data too fast for your internet connection to handle

If a packet is lost, you need to devise some way to detect this, and resend that data if necessary

About
Achchuthan Yogarajah

I’m passionate about Web Development and Programming and I go to extreme efforts to meet my passion. I’m a believer of learning the fundamentals first. I try to understand everything little bit more than the average.

Google+ Badge

About Me

I’m an undergraduate for the B.Sc. Special in Computer Science at Department of Computer Science, University of Jaffna, Sri Lanka.

I’m passionate about Web Development and Programming and I go to extreme efforts to meet my passion. I’m a believer of learning the fundamentals first. I try to understand everything little bit more than the average.

My main areas of interests are Programming, Web Development and Teaching.