How do TCP and UDP differ in the way that they establish a connection between two endpoints?
Click on the arrows to vote for the correct answerA. B. C. D.
TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) are two of the most commonly used transport layer protocols in computer networking. TCP and UDP differ in several ways, including the way they establish a connection between two endpoints.
TCP uses the three-way handshake to establish a connection between two endpoints. The three-way handshake is a process that involves three packets exchanged between the two endpoints: SYN, SYN-ACK, and ACK.
Here's how the three-way handshake works:
The three-way handshake ensures that the server is ready to receive data before the client starts sending data, and that the data is being sent to the correct endpoint. It also establishes a reliable and ordered communication between the two endpoints.
On the other hand, UDP does not establish a connection between two endpoints. It is a connectionless protocol, which means that there is no need for a handshake or synchronization packets. Instead, the sender simply sends a datagram to the recipient, and the recipient receives the datagram without any confirmation or acknowledgment.
UDP does not guarantee message delivery, which means that there is no guarantee that the datagram will reach the recipient. However, UDP is often used for applications that require fast and efficient transmission of data, such as video streaming and online gaming, where a few lost packets do not affect the overall quality of the transmission.
In summary, TCP uses the three-way handshake to establish a reliable and ordered connection between two endpoints, while UDP is a connectionless protocol that does not guarantee message delivery.