Network Programming


This course teaches the methods and tools used for network programming. Topics include: Operating System support for network protocols; inter-process communication facilities such as pipes, Remote Procedure Calls (RPC) and sockets; design of client and server sides of network protocols; and network security. 

General Class Information


Mike Parsa, Email:
Office: E2 Room 339B
Office Hours: Monday 6:00 – 6:45 pm

Teaching Assistant

Kerry Veenstra, Email:
Office Hours: during lab sessions

Class Meeting Times

Lecture: Monday, Wednesday 7:00 – 8:45 pm, Social Sciences 2, Room 159
Lab: Monday 2–4 and Wednesday 8–10, BE 301A 

Other Dates

Begins: January 5
Midterm: February 9
Holidays: January 19 and February 16
Ends: March 16




Unix Network Programming, Volume 1, The Sockets Networking API, 3rd ed.
By W. Richard Stevens, Bill Fenner, and M. Rudoff
ISBN-10: 0131411551, ISBN-13: 9780131411555
© 2004 Addison-Wesley Professional
Published November 14, 2003

It is worth the investment to have a personal copy of this book. You will use it for years!

The book's web site has a link to let you download all of its source code examples.

Evaluation Criteria

Programming Assignments 40%
Midterm 20%
Final Project 30%
Class Participation and Attendance 10%

Academic Integrity

All programs submitted must be your own. Any unauthorized collaboration will be treated as a violation of academic integrity and handled according to University policies (see Student Guide to Academic Integrity for details).

Topics by Week

Week 1: (1/5 – 1/7) Introduction and Review, Transport Layer (TCP and UDP), Sockets.

Weeks 2 and 3: (1/12, 1/14, 1/21) Operating System support for network protocols (process management, memory management, mutual exclusion). Inter-process communication mechanisms: sockets, forks.

Week 4: UDP sockets, SCTP.

Week 5: DNS, HTTP.

Week 6: Design of client and server sides of network applications.

Week 6: Case study: Apache Web Server

Week 7: Multicast and broadcast

Weeks 8–10: Final project

Lecture Notes and References

January 5, 7

Networking Review & Transport Layer

Sockets Overview

January 12, 14

A pthreads Tutorial

pthreads Example


Source Code for tcpserv01.c

See also Chapter 26 of the textbook

January 22

Thread Safety

Concurrent Servers (forks & signals)

See also Chapters 4 & 5 of the textbook

January 26, 28

I/O Multiplexing

Socket Options

UDP Sockets

See also Chapters 6, 7, & 8 of the textbook

February 2, 4


Name and Address Conversions

Broadcasting & Multicasting


February 11

Advanced I/O

February 18, 23


February 25


Programming Assignments

Programming Assignment 1 (due Friday, Jan 23)

Programming Assignment 2 (due Wednesday, Feb 4)

Programming Assignment 3 (due Monday, Feb 16)

Programming Assignment 4 (due Monday, Mar 2)

Final Project

Final Programming Assignment (Due Monday, March 16)


RFC 1058

Lecture on Routing


Instructors and Assistants