Skip to Content
TCP/IP Sockets in C, 2nd Edition
book

TCP/IP Sockets in C, 2nd Edition

by Michael J. Donahoo, Kenneth L. Calvert
March 2009
Intermediate to advanced content levelIntermediate to advanced
216 pages
5h 20m
English
Morgan Kaufmann
Content preview from TCP/IP Sockets in C, 2nd Edition

Chapter 4 Using UDP Sockets

The User Datagram Protocol (UDP) provides a simpler end-to-end service than TCP provides. In fact, UDP performs only two functions: (1) It adds another layer of addressing (ports) to that of IP; and (2) it detects data corruption that may occur in transit and discards any corrupted datagrams. Because of this simplicity, UDP (datagram) sockets have some different characteristics from the TCP (stream) sockets we saw earlier.

For example, UDP sockets do not have to be connected before being used. Where TCP is analogous to telephone communication, UDP is analogous to communicating by mail: You do not have to “connect” before you send a package or letter, but you do have to specify the destination address for each one. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

TCP/IP Sockets in C#

TCP/IP Sockets in C#

David Makofske, Michael J. Donahoo, Kenneth L. Calvert

Publisher Resources

ISBN: 9780080923215