TCP and UDP Made Simple



Whenever a computer wants to communicate with another computer the communication between those two computers needs to be good and reliable so we can guarantee that the data is received correctly. For example when you want to view a webpage or download a file or look at an email you would expect to view the webpage intact and in order with nothing missing.

If you’re downloading a file you would want the entire file and not just a part of the file. Because if data is missing or out of order then it wouldn’t be of any benefit to you. This is where TCP comes in.

TCP stands for transmission control protocol and this is one of the main protocols used in a TCP/IP network. TCP is what is used to guarantee that all the data is received and in order, because without TCP then some of the data could be missing or out of order.

If you view a web page without TCP your webpage could be all messed up. The images could be missing or the text could be backwards and out of order or if you download a file then you might not get the entire file or you could get the file out of order which would render the file useless.

Now TCP is a connection-oriented protocol which basically means that it must first acknowledge a session between the two computers that are communicating so the two computers verify a connection before any communication takes place and it does this by using a three-way handshake.

The first step is that a computer will send a message called a SYN and then the receiving computer will send back an acknowledgement message telling the center that it has received the message, and then finally the sender computer sends another acknowledgement message back to the receiver. Once this has taken place data can be delivered.

Another important thing to remember about TCP is that it guarantees the delivery of the data. If a data packet goes astray and doesn’t arrive then TCP will resend it.

UDP is very similar to TCP. UDP is also for sending and receiving data, but the main difference is that UDP is connectionless which means that it does not establish a session and it does not guarantee data delivery. When a computer sends their data it doesn’t really care if the data is received at the other end and that’s why UDP is known as the fire and forget protocol.

It sends data and it doesn’t really care what happens to it. Another point to remember is because of the less overhead that is involved of not guaranteeing data delivery, UDP is faster than TCP.

Want new articles before they get published?
Subscribe to our Awesome Newsletter.

Subscribe To Our Newsletter

Subscribe To Our Newsletter

Join our mailing list to receive the latest news and updates from our team.

You have Successfully Subscribed!