July 29, 2022
/ 58 /13 Differences Between Transmission Control Protocol (TCP) and User Datagram Protocol (UDP)
Transmission Control Protocol (TCP)
- TCP is termed as Transmission Control Protocol
- TCP is a connection oriented protocol, meaning that before any message will be sent, it must establish a connection with the receiving device.
- It undertakes a three handshake process for the establishment of connection by sending a SYN message and the receiving device replying with an ACK SYN and lastly the sending device will respond with ACK received
- In terms of reliability, TCP is better than UDP, and it is also secure than UDP
- It is slow since there is a lot of control protocol that exist
- The header size of TCP is 20 bytes
- It consists of more than eight fields in the message header and some of them are source port, destination port,
- length, checksum, sequence number, acknowledgement number etc.
- It has error-checking feature to ensure that data is sent or received successfully
- It transmits lost packets
- It is not used in real-time applications like steaming of online video games
- TCP involves in a one-to-one communication or transmission
- TCP is used in several protocols such as HTTP and HTTPS (for web), SMTP (for email), TELNET and FTP (file transfer)
User Datagram Protocol (UDP)
- UDP is termed as User Datagram Protocol
- UDP is a connectionless-oriented protocol, meaning that there is no need of communicating with the receiving device before transmitting
- It does not undertake any handshake
- In terms of reliability, UDP is less reliable than TCP
- It is fast as there are fewer features involved
- It consists of four fields in the message header
- The header size of UDP is 8 bytes
- It consists of eight fields in the message header which are source port, destination port, length and checksum
- It does not have error-checking feature
- It does not retransmit lost packet
- It is used in real-time applications
- UDP involves in a multicast or broadcast communication or transmission
- UDP is used in several protocols such as VoIP (voice over IP), DNS (server) and DHCP