TCP and UDP are Transport Layer protocols which allow multiple applications to use one network connection simultaneously.
At the sending end of each transmission, TCP divides a stream of data into smaller units called segments. Each segment includes a sequence number and an acknowledgment number for ordering at the receiver side. It has a bigger header of 20 bytes. It provides congestion control and the segments reach in-order.
UDP: It stands for User Datagram Protocol. It is a process-to-process that adds only port addresses, checksum, error control and length information to the data from the upper layer. It is an unreliable connectionless protocol widely used for client-server applications. There is no need to establish and maintain a connection between a sender and a receiver.
It is lightweight with a header of size 8 bytes. There is no congestion control and no compensation for lost packets. The packets can arrive out of order at the receiver side.
Comments
Post a Comment