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

Skip to content

Commit bda7ca7

Browse files
committed
Added [nh]to[hn][sl]().
1 parent dde9c2c commit bda7ca7

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

Doc/lib/libsocket.tex

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,17 @@ \section{Built-in Module \sectcode{socket}}
133133
daemon).
134134
\end{funcdesc}
135135

136+
\begin{funcdesc}{ntohl}{x}
137+
\funcline{ntohs}{x}
138+
\funcline{htonl}{x}
139+
\funcline{htons}{x}
140+
These functions convert 32-bit (`l' suffix) and 16-bit (`s' suffix)
141+
integers between network and host byte order. On machines where the
142+
host byte order is the same as the network byte order, they are no-ops
143+
(assuming the values fit in the indicated size); otherwise, they
144+
perform 2-byte or 4-byte swap operations.
145+
\end{funcdesc}
146+
136147
\subsection{Socket Objects}
137148

138149
\noindent

Doc/libsocket.tex

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,17 @@ \section{Built-in Module \sectcode{socket}}
133133
daemon).
134134
\end{funcdesc}
135135

136+
\begin{funcdesc}{ntohl}{x}
137+
\funcline{ntohs}{x}
138+
\funcline{htonl}{x}
139+
\funcline{htons}{x}
140+
These functions convert 32-bit (`l' suffix) and 16-bit (`s' suffix)
141+
integers between network and host byte order. On machines where the
142+
host byte order is the same as the network byte order, they are no-ops
143+
(assuming the values fit in the indicated size); otherwise, they
144+
perform 2-byte or 4-byte swap operations.
145+
\end{funcdesc}
146+
136147
\subsection{Socket Objects}
137148

138149
\noindent

0 commit comments

Comments
 (0)