Newbie question: how to keep a socket listening?

Grant Edwards grante at
Fri Jun 24 20:26:51 CEST 2005

On 2005-06-24, ncf <nothingcanfulfill at> wrote:

> I think your problem /may/ be in the following line of code:
> sa.listen(1)
> I believe what's happening is that the listen() creates a decremental
> counter of the number of connections to accept. Once it decrements to
> 0, it won't accept any more connections. (I'm not at all sure, but that
> sounds like what it's doing.)

The "1" tells the stack how many pending connections are allowed.

Grant Edwards                   grante             Yow!  I FORGOT to do the
                                  at               DISHES!!

More information about the Python-list mailing list