diff Doc/lib/libsocket.tex @ 37069:dd49847a60d3 legacy-trunk

RFE #567972: Socket objects' family, type and proto properties are now exposed via new get...() methods.
author Georg Brandl <georg@python.org>
date Fri, 17 Mar 2006 19:17:34 +0000
parents b94ee92a6d6b
children 251ecec04f1b
line wrap: on
line diff
--- a/Doc/lib/libsocket.tex	Fri Mar 17 19:03:25 2006 +0000
+++ b/Doc/lib/libsocket.tex	Fri Mar 17 19:17:34 2006 +0000
@@ -626,7 +626,7 @@
 \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 @@
 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