socketserver.ForkingTCPServer()
socketserver.ForkingTCPServer() is a Python function in the SocketServer Module category. Creates a TCP server that forks a process for each connection (Unix). The syntax is socketserver.ForkingTCPServer(server_address, RequestHandlerClass, bind_and_activate=True). Returns: ForkingTCPServer object. A typical example: server = ForkingTCPServer(("", 9999), Handler)
server.serve_forever(). A close sibling is socketserver.TCPServer(), which creates a TCP server that handles connections. A close sibling is socketserver.UDPServer(), which creates a UDP server for connectionless datagrams. A close sibling is socketserver.ThreadingTCPServer(), which creates a TCP server that handles each connection in a new thread. More about this category: Server frameworks — TCPServer, UDPServer, ThreadingTCPServer, ForkingTCPServer. Related SocketServer Module entries: socketserver.TCPServer(), socketserver.UDPServer(), socketserver.ThreadingTCPServer(). This page is part of the free Python Reference documentation covering 978+ functions, methods, and modules with examples and parameter details. You can try socketserver.ForkingTCPServer() immediately in the Python playground, look up unfamiliar terms in the glossary, or return to the Python Reference homepage.