Sobes.tech
Middle+

How does TCP differ from UDP?

sobes.tech AI

Answer from AI

TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) are two main transport layer protocols, which differ in the following key parameters:

  • Reliability: TCP provides reliable data delivery by establishing a connection, confirming receipt of packets, and retransmitting lost packets. UDP does not guarantee delivery and does not confirm receipt.

  • Connection establishment: TCP is connection-oriented, meaning data transfer occurs after establishing a connection. UDP is connectionless.

  • Speed: UDP is faster because it does not spend time on connection setup and acknowledgments.

  • Order of delivery: TCP guarantees that data will arrive in the same order it was sent. UDP does not guarantee order.

  • Usage: TCP is suitable for applications where reliability is important (e.g., web, email, file sharing). UDP is used for applications where speed is crucial and some data loss is acceptable (e.g., streaming, online gaming, VoIP).