Every network program, from a web browser to a database driver, sits on sockets. A socket is an endpoint for talking to another program, on the same machine or across the world. The socket module gives you the same interface that C programs use. This lesson builds a TCP server and client on your own machine, shows the one thing about TCP that surprises everyone, that it is a stream with no message boundaries, and then compares it with UDP.
More lessons in Complete Python Programming