Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cdf6af1

Browse files
committed
Document gethostbyname_ex().
1 parent 96e1102 commit cdf6af1

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

Doc/lib/libsocket.tex

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,18 @@ \section{Built-in Module \module{socket}}
9898
\begin{funcdesc}{gethostbyname}{hostname}
9999
Translate a host name to IP address format. The IP address is
100100
returned as a string, e.g., \code{'100.50.200.5'}. If the host name
101-
is an IP address itself it is returned unchanged.
101+
is an IP address itself it is returned unchanged. See
102+
\code{gethostbyname_ex} for a more complete interface.
103+
\end{funcdesc}
104+
105+
\begin{funcdesc}{gethostbyname_ex}{hostname}
106+
Translate a host name to IP address format, extended interface.
107+
Return a triple \code{(hostname, aliaslist, ipaddrlist)} where
108+
\code{hostname} is the primary host name responding to the given
109+
\var{ip_address}, \code{aliaslist} is a (possibly empty) list of
110+
alternative host names for the same address, and \code{ipaddrlist} is
111+
a list of IP addresses for the same interface on the same
112+
host (often but not always a single address).
102113
\end{funcdesc}
103114
104115
\begin{funcdesc}{gethostname}{}

0 commit comments

Comments
 (0)