asyncore

Doug Fort dougfort at downright.com
Thu Mar 29 07:18:47 EST 2001


Matias GUIJARRO wrote:

> - The server must be always listenning for new connections, so I call
> the
> asyncore.loop() method, but it seems to be "blocking" : the code after
> isn't
> executed. How can I make an "asyncronous" listenner ?

If your sockets are blocking, I suspect that you didn't use
asyncore.create_socket() to create them.  If so, try that.

You might want to  take a look at asynchat.py as well.  It doesn't seem to
be in the Python Library documentation, but it uses asyncore and handles a
lot of the dirty work.

You might also get some use out of asynchttp which uses asyncore and
asynchat.  http://asynchttp.sourceforge.net

--

Doug Fort (dougfort at downright.com)
Senior Meat Manager
Downright Software LLC
http://www.dougfort.net






More information about the Python-list mailing list