O'Reilly logo

Python: Essential Reference, Third Edition by David Beazley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

SocketServer

The SocketServer module is used to write TCP, UDP, and UNIX domain socket servers. Rather than having to implement servers using the low-level socket module, this module provides four classes that implement these protocols:

						TCPServer(address, handler)

A server supporting the TCP protocol using IPv4. address is a tuple of the form (host, port). handler is an instance of a subclass of the BaseRequestHandler class described later.

						UDPServer(address, handler)

A server supporting the Internet UDP protocol using IPv4. address and handler are the same as for TCPServer().

						UnixStreamServer(address, handler)

A server implementing a stream-oriented protocol using UNIX domain sockets. Inherits from TCPServer.

						UnixDatagramServer(address, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required