0% found this document useful (0 votes)
114 views1 page

Difference Between TCP and UDP

TCP is a connection-oriented protocol that ensures reliable delivery of data through acknowledgments and packet resending if needed. It guarantees ordered delivery and is more heavyweight than UDP. TCP is used for applications like web, email, FTP, and SSH. UDP is a lighter weight connectionless protocol that does not guarantee delivery, ordering, or that packets will be error-free, making it faster but less reliable than TCP. UDP is used for applications like DNS, streaming media, VoIP, and online games.

Uploaded by

Mihir Soni
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
114 views1 page

Difference Between TCP and UDP

TCP is a connection-oriented protocol that ensures reliable delivery of data through acknowledgments and packet resending if needed. It guarantees ordered delivery and is more heavyweight than UDP. TCP is used for applications like web, email, FTP, and SSH. UDP is a lighter weight connectionless protocol that does not guarantee delivery, ordering, or that packets will be error-free, making it faster but less reliable than TCP. UDP is used for applications like DNS, streaming media, VoIP, and online games.

Uploaded by

Mihir Soni
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Difference between TCP and UDP

TCP UDP
Reliability: TCP is connection- Reliability: UDP is connectionless
oriented protocol. When a file or protocol. When you a send a data or
message send it will get delivered message, you don't know if it'll get
unless connections fails. If connection there, it could get lost on the way.
lost, the server will request the lost There may be corruption while
part. There is no corruption while transferring a message.
transferring a message.
Ordered: If you send two messages Ordered: If you send two messages
along a connection, one after the out, you don't know what order they'll
other, you know the first message will arrive in i.e. no ordered
get there first. You don't have to
worry about data arriving in the
wrong order.
Heavyweight: - when the low level Lightweight: No ordering of
parts of the TCP "stream" arrive in the messages, no tracking connections,
wrong order, resend requests have to etc. It's just fire and forget! This
be sent, and all the out of sequence means it's a lot quicker, and the
parts have to be put back together, so network card / OS have to do very
requires a bit of work to piece little work to translate the data back
together. from the packets.
Streaming: Data is read as a "stream," Datagrams: Packets are sent
with nothing distinguishing where one individually and are guaranteed to be
packet ends and another begins. There whole if they arrive. One packet per
may be multiple packets per read call. one read call.
Examples: World Wide Web (Apache Examples: Domain Name System
TCP port 80), e-mail (SMTP TCP (DNS UDP port 53), streaming media
port 25 Postfix MTA), File Transfer applications such as IPTV or movies,
Protocol (FTP port 21) and Secure Voice over IP (VoIP), Trivial File
Shell (OpenSSH port 22) etc. Transfer Protocol (TFTP) and online
multiplayer games etc

You might also like