sockets: why doesn't my connect() block?

Jean-Paul Calderone exarkun at
Sun Nov 18 16:18:25 CET 2007

On Sat, 17 Nov 2007 21:32:50 -0800 (PST), 7stud <bbxx789_05ss at> wrote:
>According to "Python in a Nutshell(2nd)", p. 523:
>connect:   s.connect((host, port))
>Blocks until the server accepts or rejects the connection attempt.
>However, my client program ends immediately after the call to
>connect()--even though my server program does not call accept():

Your platform's TCP implementation acknowledges the connection attempt
before your application calls accept().  This is fairly usual.


More information about the Python-list mailing list