diff options
author | Guido van Rossum <guido@python.org> | 2002-06-06 21:08:16 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2002-06-06 21:08:16 (GMT) |
commit | 67f7a388496aec53896a0a5109edf9026bbe5d5b (patch) | |
tree | afa4d86d404b77167e7da09152db2a3562b729a2 /Modules/socketmodule.h | |
parent | c9a55776c88619d1b79d47d4734af0f2c423c045 (diff) | |
download | cpython-67f7a388496aec53896a0a5109edf9026bbe5d5b.zip cpython-67f7a388496aec53896a0a5109edf9026bbe5d5b.tar.gz cpython-67f7a388496aec53896a0a5109edf9026bbe5d5b.tar.bz2 |
SF patch 555085 (timeout socket implementation) by Michael Gilfix.
I've made considerable changes to Michael's code, specifically to use
the select() system call directly and to store the timeout as a C
double instead of a Python object; internally, -1.0 (or anything
negative) represents the None from the API.
I'm not 100% sure that all corner cases are covered correctly, so
please keep an eye on this. Next I'm going to try it Windows before
Tim complains.
No way is this a bugfix candidate. :-)
Diffstat (limited to 'Modules/socketmodule.h')
-rw-r--r-- | Modules/socketmodule.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/socketmodule.h b/Modules/socketmodule.h index a59e6f7..4d17f08 100644 --- a/Modules/socketmodule.h +++ b/Modules/socketmodule.h @@ -83,6 +83,9 @@ typedef struct { PyObject *(*errorhandler)(void); /* Error handler; checks errno, returns NULL and sets a Python exception */ + int sock_blocking; /* Flag indicated whether the + socket is in blocking mode */ + double sock_timeout; /* Operation timeout value */ } PySocketSockObject; /* --- C API ----------------------------------------------------*/ |