On Mon, Apr 12, 2010 at 3:59 PM, Daniel Stutzbach <daniel at stutzbachenterprises.com> wrote: > On Mon, Apr 12, 2010 at 5:34 PM, Jesus Cea <jcea at jcea.es> wrote: >> >> The problem is: linux doesn't uses KEEPALIVE by default. > > If you believe the problem is with the Linux kernel, perhaps you should take > up your case on a more appropriate mailing list? > > Python's socket module is a fairly low-level module, as it's just a thin > wrapper around the corresponding operating system calls. Anyone using it > has to be prepared to deal with a certain amount of exposed operating system > details. Bingo. I expect that changing this will have too many unanticipated ramifications to be safe. > If you want to use TCP KEEPALIVE on Linux, then just call: > my_socket_object.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1) > > Most non-trivial applications use select() or poll() to avoid blocking calls > and do their own timeout-checking at the application layer, so they don't > need KEEPALIVE. > -- > Daniel Stutzbach, Ph.D. > President, Stutzbach Enterprises, LLC -- --Guido van Rossum (python.org/~guido)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4