Mercurial > cpython-lru_cache-weakref
diff Doc/lib/libsocket.tex @ 29665:d7626b80de95 legacy-trunk
SF patch #760257: add socket.timeout exception
(Contributed by Bob Halley)
Add documentation for the new socket.timeout exception.
| author | Raymond Hettinger <python@rcn.com> |
|---|---|
| date | Sun, 29 Jun 2003 04:55:59 +0000 |
| parents | a296214d2ebb |
| children | ad09687aaaa0 |
line wrap: on
line diff
--- a/Doc/lib/libsocket.tex Sun Jun 29 04:53:23 2003 +0000 +++ b/Doc/lib/libsocket.tex Sun Jun 29 04:55:59 2003 +0000 @@ -109,6 +109,14 @@ by the \cfunction{gai_strerror()} C function. \end{excdesc} +\begin{excdesc}{timeout} +This exception is raised when a timeout occurs on a socket which has +had timeouts enabled via a prior call to \method{settimeout()}. The +accompanying value is a string whose value is currently always ``timed +out''. +\versionadded{2.3} +\end{excdesc} + \begin{datadesc}{AF_UNIX} \dataline{AF_INET} \dataline{AF_INET6} @@ -579,7 +587,7 @@ Set a timeout on blocking socket operations. The \var{value} argument can be a nonnegative float expressing seconds, or \code{None}. If a float is -given, subsequent socket operations will raise an \exception{error} +given, subsequent socket operations will raise an \exception{timeout} exception if the timeout period \var{value} has elapsed before the operation has completed. Setting a timeout of \code{None} disables timeouts on socket operations.
