Lines Matching defs:timeout

146 gettimeout() -- return timeout or None\n\
159 settimeout(None | float) -- set or clear the timeout\n\
561 /* If there's no timeout left, we don't have to call select, so it's a safe,
763 /* s->sock_timeout is in seconds, timeout in ms */
767 /* On some OSes, typically BSD-based ones, the timeout parameter of the
826 If the socket has a timeout, wait until the socket is ready before calling
833 When the function is retried, recompute the timeout using a monotonic clock.
844 _PyTime_t timeout)
846 int has_timeout = (timeout > 0);
864 /* recompute the timeout */
869 deadline = _PyDeadline_Init(timeout);
870 interval = timeout;
881 res = internal_select(s, writing, timeout, connect);
978 /* Default timeout for new sockets */
2860 socket_parse_timeout(_PyTime_t *timeout, PyObject *timeout_obj)
2871 *timeout = _PyTime_FromSeconds(-1);
2875 if (_PyTime_FromSecondsObject(timeout,
2879 if (*timeout < 0) {
2885 overflow |= (_PyTime_AsTimeval(*timeout, &tv, _PyTime_ROUND_TIMEOUT) < 0);
2888 ms = _PyTime_AsMilliseconds(*timeout, _PyTime_ROUND_TIMEOUT);
2893 "timeout doesn't fit into C timeval");
2900 /* s.settimeout(timeout) method. Argument:
2901 None -- no timeout, blocking mode; same as setblocking(True)
2903 > 0 -- timeout mode; operations time out after timeout seconds
2909 _PyTime_t timeout;
2911 if (socket_parse_timeout(&timeout, arg) < 0)
2914 s->sock_timeout = timeout;
2916 int block = timeout < 0;
2920 `TimeoutError` or `socket.error` errors. When timeout is `None`,
2921 the underlying FD is in a blocking mode. When timeout is a positive
2925 When timeout is 0.0, the FD is in a non-blocking mode.
2945 "settimeout(timeout)\n\
2947 Set a timeout on socket operations. 'timeout' can be a float,\n\
2948 giving in seconds, or None. Setting a timeout of None disables\n\
2949 the timeout feature and is equivalent to setblocking(1).\n\
2950 Setting a timeout of zero is the same as setblocking(0).");
2953 Returns the timeout associated with a socket. */
2967 "gettimeout() -> timeout\n\
2969 Returns the timeout in seconds (float) associated with socket\n\
2970 operations. A timeout of None indicates that timeouts on socket\n\
3270 If the socket is blocking or has a timeout, wait until the
4232 _PyTime_t timeout = s->sock_timeout;
4250 /* recompute the timeout */
4251 timeout = _PyDeadline_Get(deadline);
4255 deadline = _PyDeadline_Init(timeout);
4258 if (timeout <= 0) {
4267 if (sock_call_ex(s, 1, sock_send_impl, &ctx, 0, NULL, timeout) < 0)
4921 SIO_KEEPALIVE_VALS: 'option' is a tuple of (onoff, timeout, interval).\n\
5057 {"timeout", (getter)sock_gettimeout, NULL, PyDoc_STR("the socket timeout")},
6767 /* Python API to getting and setting the default timeout value. */
6782 "getdefaulttimeout() -> timeout\n\
6784 Returns the default timeout in seconds (float) for new socket objects.\n\
6785 A value of None indicates that new socket objects have no timeout.\n\
6791 _PyTime_t timeout;
6793 if (socket_parse_timeout(&timeout, arg) < 0)
6796 defaulttimeout = timeout;
6802 "setdefaulttimeout(timeout)\n\
6804 Set the default timeout in seconds (float) for new socket objects.\n\
6805 A value of None indicates that new socket objects have no timeout.\n\
7257 PyModule_AddObjectRef(m, "timeout", PyExc_TimeoutError);