summaryrefslogtreecommitdiff
path: root/python/skytools/sockutil.py
AgeCommit message (Collapse)Author
2013-11-06set_tcp_keepalive: simplify, enable win32Marko Kreen
The code got messy, clean it up. Also, seems like Python 2.7+ support SIO_KEEPALIVE_VALS, enable it's usage.
2013-11-05skytools.set_tcp_keepalive: add compat with newer OSXMarko Kreen
Newer OSX has Linux-style TCP_KEEPIDLE/TCP_KEEPCNT socket options, but TCP_KEEPIDLE is missing, instead it has old well-hidden TCP_KEEPALIVE option. So it branches into Linux section and fails there. This patch detects every Linux option separately and uses TCP_KEEPALIVE instead TCP_KEEPIDLE on Darwin. It does expect that Python is compiled against current OSX versions, and headers match running kernel. So if option is defined in 'socket' module, it works. Reported-by: Rob Fowler
2013-06-21set_tcp_keepalive: accept socket object directlyMarko Kreen
2011-06-29skytools.sockutil: separate module for low-level socket stuffMarko Kreen
Move set_tcp_keepalive() here, plus set_nonblocking() and set_cloexec().