Whenever a computer wants to communicate with another computer then the communication between the two computers needs to be good and reliable so that we can guarantee that the data is received correctly.
For ex : When you want to view a web page or download a file or look at an email, you would expect to view the web page intact and in order, with nothing missing or when you are trying to download a file, you would like entire file and not just the part of the file. Because if the data is missing or out of order then it would not be beneficial to you. This is where TCP comes into the picture.
TCP stands for Transmission Control Protocol and this is one of the main protocols used in a TCP/IP network. The TCP is the main protocol which is used to guarantee you that data is received and at the same time in order. Because without TCP, some of the data could be missing or out of order. Because if you view a web page without TCP, your web page could be all messed up.
The images could be missing or the text could be backward and out of order or if you try to download a file without TCP then you may not get an entire file or you could get a file out of order which will make the file useless.
So again this is where the TCP comes in. Now we already knew that TCP is a connection-oriented protocol, which basically means that it must first acknowledge a session between the computers that are communicating. So the two computers verify a connection before any communication takes place.
It does it by 3-way communication or handshake so the first step is that the computer will send a message called “SYN” then the receiving computer will send back the acknowledgment telling the sender that it has received the message and finally the sender computer sends another acknowledgment message back to the receiver. Once this takes place data can be delivered.
Another important thing to remember about TCP is that it guarantees the delivery of the data so if a data packet goes astray and doesn’t arrive then the TCP will resend it.
Let’s discuss UDP : –
UDP stands for User Datagram Protocol. It is very similar to TCP. It will also perform sending and receiving data, but the main difference between TCP and UDP is that UDP is a connectionless oriented protocol which means that it does not establish a session and it does not guarantee data delivery. So when a computer sends data it does not really care, if the data is received at the other end.
That’s why UDP is known as fire and forget protocol. Because it sends data and it does not really care what happens to it.
Another point to remember is because of the less overhead that involved not guarantee data delivery. UDP is faster than TCP.
Visit – Hostdens
You must log in to post a comment.