Appendix C. The sock Program

A simple test program named sock is used throughout the book to generate TCP and UDP data. It is used as both a client and server process. Having a test program like this, which is executable from a shell prompt, prevents us from having to write new client and server C programs for each specific feature that we want to examine. Since the purpose of this book is to understand the networking protocols, and not network programming, in this Appendix we only describe the program and its various options.

There are numerous other programs with functionality similar to sock. Juergen Nickelsen wrote a program named socket and Dave Yost wrote a program named sockio. Both contain many similar features. Pieces of the sock program ...

Get TCP/IP Illustrated, Volume 1: The Protocols now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.