closing a server socket
Peter Hansen
peter at engcorp.com
Tue Oct 14 17:30:19 EDT 2003
simon place wrote:
>
> Peter Hansen wrote:
> > None of this should be necessary!
> >
> > What problems were you having that led you to try the above abomination in
> > your effort to resolve them?
>
> The problem is i couldn't find anyway, in 'normal' code, to close a server
> socket, ie unblock an accept.
>
> tried to use non-blocking mode, but not allowed on a server socket, which
> makes sense, but isn't documented.
It does work, which is why it isn't documented that it doesn't. <wink>
What did you try, that non-blocking server sockets don't work for you?
(I assume you are talking about using select.select() to detect when the
listening socket has a client connection waiting to be accepted.)
-Peter
More information about the Python-list
mailing list