What's the meaning the "backlog" in the socket.listen(backlog) is?

Jach Feng jfong at ms4.hinet.net
Tue Feb 16 22:24:30 EST 2021


I am experimenting with multithreading-socket these days. I build a server to handle each client in a separate thread. All are running on my local PC. It works fine except the listen() method.

I set listen(2) and expect to see "error" when more clients than "the maximum number of queued connections" trying to connect the server. But, no error!! Even 4 clients can run normally without problem.

Am I misunderstanding the meaning of this argument?

--Jach


More information about the Python-list mailing list