diff options
author | Barry Warsaw <barry@python.org> | 2004-06-28 00:50:43 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2004-06-28 00:50:43 (GMT) |
commit | 11b91a0ea33fc4632a84d1b762f432411f9a0ddd (patch) | |
tree | 9727062871138ce674455ee6c021220361bd8ccb /Doc | |
parent | 1ed5705154d6a0f4e23345f3ead902d2fffecca8 (diff) | |
download | cpython-11b91a0ea33fc4632a84d1b762f432411f9a0ddd.zip cpython-11b91a0ea33fc4632a84d1b762f432411f9a0ddd.tar.gz cpython-11b91a0ea33fc4632a84d1b762f432411f9a0ddd.tar.bz2 |
Added socket.getservbyport(), and make its second argument and that of
getservbyname() optional. Update the tests and the docs.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/lib/libsocket.tex | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Doc/lib/libsocket.tex b/Doc/lib/libsocket.tex index 9ff5f01..f78ad2f 100644 --- a/Doc/lib/libsocket.tex +++ b/Doc/lib/libsocket.tex @@ -272,10 +272,16 @@ modes, the correct protocol is chosen automatically if the protocol is omitted or zero. \end{funcdesc} -\begin{funcdesc}{getservbyname}{servicename, protocolname} +\begin{funcdesc}{getservbyname}{servicename\optional{, protocolname}} Translate an Internet service name and protocol name to a port number -for that service. The protocol name should be \code{'tcp'} or -\code{'udp'}. +for that service. The optional protocol name, if given, should be +\code{'tcp'} or \code{'udp'}, otherwise any protocol will match. +\end{funcdesc} + +\begin{funcdesc}{getservbyport}{port\optional{, protocolname}} +Translate an Internet port number and protocol name to a service name +for that service. The optional protocol name, if given, should be +\code{'tcp'} or \code{'udp'}, otherwise any protocol will match. \end{funcdesc} \begin{funcdesc}{socket}{\optional{family\optional{, |