February 2006
Intermediate to advanced
648 pages
14h 53m
English
The BaseHTTPServer module defines two base classes used to implement standalone HTTP servers. This module is used by a number of other modules, including SimpleHTTPServer, CGIHTTPServer, and SimpleXMLRPCServer.
HTTPServer(server_address, request_handler)
Creates a new HTTPServer object. server_address is a tuple of the form (host, port) on which the server will listen. request_handler is a factory function that is used to create instances of BaseHTTPRequestHandler objects, described later. These handler objects are used to handle the details of each connection that is made to the server.
The HTTPServer class is derived from SocketServer.TCPServer and supports the same methods. In particular, the following functions are most relevant: ...
Read now
Unlock full access