Mercurial > cpython-lru_cache-weakref
diff Doc/lib/libsocket.tex @ 32429:d8abf582f893 legacy-trunk
Added socket.getservbyport(), and make its second argument and that of
getservbyname() optional. Update the tests and the docs.
| author | Barry Warsaw <barry@python.org> |
|---|---|
| date | Mon, 28 Jun 2004 00:50:43 +0000 |
| parents | 525abc66bcc2 |
| children | 90da70986407 |
line wrap: on
line diff
--- a/Doc/lib/libsocket.tex Mon Jun 28 00:48:30 2004 +0000 +++ b/Doc/lib/libsocket.tex Mon Jun 28 00:50:43 2004 +0000 @@ -272,10 +272,16 @@ 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{,
