[Computer Networking] TCP versus UDP

Dongwoo Lee·2023년 3월 8일

Computer Network

목록 보기
2/2

Q. How to develop your own Internet application?

A. You should write programs(in C, Python, ...) on host using socket interface.


Socket interface : An API for correct delivery through the Internet.

There are two types for interfaces(TCP, UDP), which one to use depends on user selection according to app feature.

Internet Protocol Suite at the Transport Layer ( TCP, UDP )

TCP (Transmission Control Protocol)

TCP (Transmission Control Protocol) is an important network protocol that allows two hosts to connect and exchange data streams. TCP ensures that data and packets are delivered in the order they are sent.

UDP (User Datagram Protocol)

The User Datagram Protocol (UDP) is a communication protocol used over the Internet, especially for time-sensitive transfers such as video playback or DNS lookups. With this protocol, a connection is not formally established until data is sent, which speeds up communication.

TCP versus UDP

FeatureTCPUDP
Connection statusRequires an established connection to transmit dataConnectionless protocol with no requirements
Data sequencingAble to sequenceUnable to sequence
Guaranteed deliveryCan guarantee delivery of data to the destination routerCannot guarantee delivery of data to the destination
Retransmission
of data
Retransmission of lost packets is possibleNo retransmission of lost packets
Error checkingExtensive error checking and acknowledgment of dataBasic error checking mechanism using checksums
Method of transferData is read as a byte streamUDP packets with defined boundaries
SpeedSlower than UDPFaster than TCP
BroadcastingDoes not support BroadcastingDoes support Broadcasting
Optimal useUsed by HTTPS, HTTP, etcVideo conferencing, streaming, DNS, etc


Reference
https://www.lifesize.com/blog/tcp-vs-udp/
https://www.colocationamerica.com/blog/tcp-ip-vs-udp

0개의 댓글