[Python-Dev] SocketServer issues (original) (raw)
Kristján Valur Jónsson kristjan at ccpgames.com
Wed Mar 14 20:35:54 CET 2012
- Previous message: [Python-Dev] SocketServer issues
- Next message: [Python-Dev] SocketServer issues
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Yes, setting a timeout and leaving it that way is not the same. But setting the timeout for accept only is the "same" except one approach requires the check of a bool return, the other the handling of a socket.timeout exeption. My point is, if sockets already have nice and well defined timeout semantics, why not use them, or even improve them (perhaps with an optional timeout parameter to the accept call) rather than reimplement them with an explicit select.select() call?
Anyway, I'll take another look at the problem and possibly submit a patch suggestion. Thanks.
K
-----Original Message----- From: gvanrossum at gmail.com [mailto:gvanrossum at gmail.com] On Behalf Of Guido van Rossum Sent: 14. mars 2012 11:44 To: Kristján Valur Jónsson Cc: Antoine Pitrou; python-dev at python.org Subject: Re: [Python-Dev] SocketServer issues
2012/3/14 Kristján Valur Jónsson <kristjan at ccpgames.com>:
Maybe this is all just nonsense, still it seems odd to jump through extra hoops to emulate a functionality that is already supported by the socket spec, and can be done in the most appropriate way for each implementation.
I thought I had already explained why setting the timeout on the socket is not the same.
-- --Guido van Rossum (python.org/~guido)
- Previous message: [Python-Dev] SocketServer issues
- Next message: [Python-Dev] SocketServer issues
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]