What is TCP and UDP?
What is TCP and UDP?
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'd expect to view the webpage intact and in order with nothing missing or 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.
TCP stands for Transmission Control Protocol.
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.
Without TCP the some of the data could be missing or out of order.
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 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.
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.
Then the receiving computer will send back an acknowledgement message (SYN ACK) telling the sender that it has received the message.
Then finally the sender computer sends another acknowledgment message (ACK) back to the receiver and then 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 so if a data packet goes astray and doesn't arrive then TCP will resend it to you.
UDP stands for User Datagram Protocol.
Now 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.
So 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 because it sends data and it doesn't really care what happens to it.
UDP is faster than TCP.
Another point to remember is because of the less overhead that's involved of not guaranteeing data delivery.
Post a Comment
If You Have Any Problems Regarding To This Information Then Feel Free To Ask Here.