Stopping a socket.accept() method
peter at engcorp.com
Mon Aug 16 23:33:59 CEST 2004
Tobias Pfeiffer wrote:
> On 16 Aug 2004, Peter Hansen wrote:
>>Tobias Pfeiffer wrote:
>>2. You can use a non-blocking socket and select(), which
>>will allow a periodic wakeup to check a flag that is set
>>by whatever mechanism you want to tell the prog to stop.
> And how exactly do you propose to code this "non-blocking socket"? I've
> no idea how to realize that? Could you maybe give me a little example of
> how to work with socket.accept() and select()?
Sure, but did you look for yourself? I'm pretty sure Google
would turn up some good stuff for you if you tried with
"Python non-blocking socket accept select" or some subset
of that. If you look but can't find I'd be happy to help
point you even more specifically in the right direction.
(I suspect checking the documentation for the "select" module
would help too.)
More information about the Python-list