Slow Python and Sockets in windows

MetalOne jcb at iteris.com
Thu Oct 23 16:25:30 EDT 2003


I don't see the problem in this snippet of code.
However, the connect calls should succeed without the need to
continually retry.
The 35 second startup sounds like something is waiting for a timeout
to complete.
The recv() calls are blocking calls by default.
Could you be blocked in a recv() call.
I can't see if you are using threads to handle each client
communication.

You have also ommitted how you are accepting connections.  Perhaps the
server may be busy and not ready to accept connections.

Have you looked into using asyncore and asynchat.  These modules make
TCP/IP communication very easy.




More information about the Python-list mailing list