TCP and UDP both are used for transferring data or packets on the internet. They are the protocols to send the data. Both perform the same job but the way is different. TCP stands for “Transmission Control Protocol”. UDP stands for “User Datagram Protocol.” The main difference between them is that the TCP is connection oriented while UDP is connection-less. In TCP after the connection is setup, bidirectional sending of data is possible but in UDP, packets are sent in chunks. TCP is more reliable than UDP, but UDP is faster than TCP.
What is TCP?
TCP stands for “Transmission Control Protocol.” TCP is a connection-oriented protocol in which the data can be transferred bidirectionally after connection is being setuped. TCP is reliable and secure but comparatively slower as it keeps the data smooth and checks error. The order of data at receiving end is same as on sending end. Header size of TCP is 20 bytes.
UDP stands for “User Datagram Protocol.” UDP is connection-less protocol in which data is needed to send in chunks. UDP don’t have error checking mechanism that is why it is less reliable but is faster in data transferring than TCP. Header size of UDP is 8 bytes.
- TCP stands for “Transmission Control Protocol” while UDP stands for “User datagram Protocol”.
- TCP is connection oriented protocol while UDP is connectionless protocol.
- TCP is more reliable than UDP.
- UDP is more faster for data sending than TCP.
- UDP makes error checking but no reporting but TCP makes checks for errors and reporting.
- TCP gives guarantee that the order of data at receiving end is same as on sending end while UDP has no such guarantee.
- Header size of TCP is 20 bytes while that of UDP is 8 bytes.
- TCP is heavy weight as it needs three packets to setup a connection while UDP is light weight.
- TCP has acknowledgement segments but UDP has no acknowledgement.
- TCP is used for application that require high reliability but less time critical whereas UDP is used for application that are time sensitive but require less reliability.