Handling more than one request on a socket

John Roth johnroth at ameritech.net
Thu Aug 30 16:06:29 EDT 2001


<brueckd at tbye.com> wrote in message
news:mailman.999093823.9432.python-list at python.org...
> On Tue, 28 Aug 2001, John Roth wrote:
>
> > Doesn't your listen have to be in a loop? Each time it returns, the
return
> > from listen is a new connection socket descriptor (file descriptor).
Then
> > you
> > spin off whatever you need to do to handle the connection - a new
> > process, thread or whatever.
>
> No! You need to call listen only once. You call accept over and over, but
> not listen.

You're absolutely right - my brain stumbled on that one. The only excuse is
that
I was coming down with a one day flu (ugh!)

John
>
> -Dave
>
>





More information about the Python-list mailing list