Brian Allen Vanderburg II wrote:
As for the backlog (5), this doesn't mean that you can only have a maximum of 5 established connections. Each established connection gets a new socket object. But what I think it means is that during the listen for an incoming connection on the listening socket, if multiple connection attempts are coming in at one time it can keep a backlog of up to 5 of these connection attempts for that individual socket.
Right. An incoming connect adds a connection to the listen queue, and the application's accept() call removes one connections from the queue.
The limited backlog is relevant to the OP's suggestion of calling SocketServer.handle_request() periodically. The accept() that pulls connections off the listen queue is within handle_request(), thus during the period between these calls incoming connections will queue up and could easily reach the limit.
-- --Bryan -- http://mail.python.org/mailman/listinfo/python-list