summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-03-17 19:17:34 (GMT)
committerGeorg Brandl <georg@python.org>2006-03-17 19:17:34 (GMT)
commitbc45a3f8210213986e12dfecd7c12b8a45b4f16b (patch)
tree290112e792ae1587f3c2db552975f8e06de05d4c /Doc
parent5c170fd4a9d2bc2e475d718cbbce526cad4a3eaa (diff)
downloadcpython-bc45a3f8210213986e12dfecd7c12b8a45b4f16b.zip
cpython-bc45a3f8210213986e12dfecd7c12b8a45b4f16b.tar.gz
cpython-bc45a3f8210213986e12dfecd7c12b8a45b4f16b.tar.bz2
RFE #567972: Socket objects' family, type and proto properties are
now exposed via new get...() methods.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/lib/libsocket.tex17
1 files changed, 16 insertions, 1 deletions
diff --git a/Doc/lib/libsocket.tex b/Doc/lib/libsocket.tex
index cc7bd75..fd43b1d 100644
--- a/Doc/lib/libsocket.tex
+++ b/Doc/lib/libsocket.tex
@@ -626,7 +626,7 @@ timeouts on socket operations.
\end{methoddesc}
\begin{methoddesc}[socket]{gettimeout}{}
-Returns the timeout in floating seconds associated with socket
+Return the timeout in floating seconds associated with socket
operations, or \code{None} if no timeout is set. This reflects
the last call to \method{setblocking()} or \method{settimeout()}.
\versionadded{2.3}
@@ -654,6 +654,21 @@ Note that the \method{connect()} operation is subject to the timeout
setting, and in general it is recommended to call
\method{settimeout()} before calling \method{connect()}.
+\begin{methoddesc}[socket]{getfamily}{}
+Return the socket family, as given to the \class{socket} constructor.
+\versionadded{2.5}
+\end{methoddesc}
+
+\begin{methoddesc}[socket]{gettype}{}
+Return the socket type, as given to the \class{socket} constructor.
+\versionadded{2.5}
+\end{methoddesc}
+
+\begin{methoddesc}[socket]{getproto}{}
+Return the socket protocol, as given to the \class{socket} constructor.
+\versionadded{2.5}
+\end{methoddesc}
+
\begin{methoddesc}[socket]{setsockopt}{level, optname, value}
Set the value of the given socket option (see the \UNIX{} manual page
\manpage{setsockopt}{2}). The needed symbolic constants are defined in