Before you start
IP sockets are the lowest-level layer upon which high-level Internet protocols are built: everything from HTTP to SSL to POP3 to Kerberos to UDP-Time. To implement custom protocols, or to customize implementation of well-known protocols, a programmer needs a working knowledge of the basic socket infrastructure. A similar API is available in many languages; this tutorial uses C programming as a ubiquitous low-level language, and Python as a representative higher-level language for examples.
In Part 1 of this tutorial series, David introduced readers to the basics of programming custom network tools using the widespread and cross-platform Berkeley Sockets Interface. In this tutorial, he picks up with further explanation of User Datagram Protocol (UDP), and continues with a discussion of writing scalable socket servers.
This tutorial is best suited for readers with at least a basic knowledge of C and Python. However, readers who are not familiar with either programming language should be able to make it through with a bit of extra effort; most of the underlying concepts will apply equally to other programming languages, and calls will be quite similar in most high-level scripting languages like Ruby, Perl, TCL, etc.
Although this tutorial introduces the basic concepts behind IP (Internet Protocol) networks, some prior acquaintance with the concept of network protocols and layers will be helpful (see the Resources at the end of this tutorial for background documents).




