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

greg greg at cosc.canterbury.ac.nz
Mon Nov 19 01:56:06 CET 2007


7stud wrote:
> If my platform accepted the connection, then why does my server
> program have to call accept()?

By making the listen() call, you've indicated your willingness
to accept connections. The accept() call just gives you a file
descriptor for the accepted connection (it's perhaps a little
misnamed in that regard).

--
Greg



More information about the Python-list mailing list