Introduction to Socket Programming


Pre-requisites

Course Outline

Code Samples

All the code samples here are working programs that are used in the class to reinforce the lecture notes.

tcpEchoClient.c
This application reads text from the user, opens a connection to a remote computer's echo service, sends the text, reads the result and prints it out. This program shows all the phases of TCP socket programming on both the IPv4 and IPv6 protocols.

Suggested Texts

Although the class is fully self contained it is often helpful to have supporting texts. I recommend the following:

TCP/IP Illustrated Volume 1 by W. Richard Stevens
Provides an excellent overview of the TCP/IP protocol suite including detailed examples and real world packet traces.
The Design and Implementation of the FreeBSD Operating System by McKusick and Neville-Neil
The reference on the FreeBSD Operating System, the progenitor of the sockets API and TCP/IP networking. Discusses the entire system, not just networking and sockets.