DEV Community

TANMOY MANDAL
TANMOY MANDAL

Posted on

Differences between TCP and UDP

TCP: Transmission Control Protocol(TCP) is a connection-oriented protocol that computers use to communicate over the internet
UDP: User Datagram Protocol(UDP) is a connectionless protocol that works like TCP, but for UDP error-checking and recovery services are not required.UDP sends datagrams to the recipient whether they receive them or not
TCP is connection-oriented protocol that establish a connection before starting the communication but UDP is connection less protocol from UDP Data is transferred in one direction from source to destination without checking that destination is still there or not.
TCP checks whether message is received or not and sends again if an error occurs but for UDP does not guarantees a messages delivery.
Ordering: TCP does ordering and sequencing to guarantee that packets sent from a server will be delivered to receiver in same sequence,but for the UDP sends packets in any order.
Speed: TCP is slower than UDP cause it has a lot more to do.TCP has to establish and guarantee that files are received in the order they were sent.
TCP USE: HTTP,HTTPS,SSH,FTP,SMTP,POP
UDP USE: Streaming videos, online games,Live Broadcasts,TFTP

Top comments (0)