next up previous contents
Next: Networking Up: TCP/IP Networks Previous: More on Ports

The Socket Library


In operating systems, the software performing all the tasks and protocols described above is usually part of the kernel, and so it is in . The programming interface most common in the world is the Berkeley Socket Library. Its name derives from a popular analogy that views ports as sockets, and connecting to a port as plugging in. It provides the (bind(2)) call to specifiy a remote host, a transport protocol, and a service which a program can connect or listen to (using connect(2), listen(2), and accept(2)). The socket library is however somewhat more general, in that it provides not only a class of TCP/IP-based sockets (the AF_INET sockets), but also a class that handles connections local to the machine (the AF_UNIX class). Some implementations can also handle other classes as well, like the XNS (Xerox Networking System) protocol, or X.25.

In , the socket library is part of the standard libc C library. Currently, it only supports AF_INET and AF_UNIX sockets, but efforts are made to incorporate support for Novell's networking protocols, so that eventually one or more socket classes for these would be added.


Andrew Anderson
Thu Mar 7 23:22:06 EST 1996