\hypertarget{group__socket}{
\section{socket: General socket manipulations}
\label{group__socket}\index{socket: General socket manipulations@{socket: General socket manipulations}}
}
\subsection*{IP socket functions}
\begin{CompactItemize}
\item 
int \hyperlink{group__socket_gc3ff4662c65f65784534be54ef73a5c1}{socket\_\-tcp4} (void)
\item 
int \hyperlink{group__socket_ga40101a7969252728f0f29a7b40afbb0}{socket\_\-tcp6} (void)
\item 
int \hyperlink{group__socket_g88d576380c2025501e9a8266bcddc759}{socket\_\-tcp} (void)
\item 
int \hyperlink{group__socket_g6f5bd2aa2b03be301bdd402a96d8c1cc}{socket\_\-udp4} (void)
\item 
int \hyperlink{group__socket_g97257e7446c72c21b3b80b56efae5114}{socket\_\-udp6} (void)
\item 
int \hyperlink{group__socket_gaa146f612229109460767f7b33264436}{socket\_\-udp} (void)
\item 
int \hyperlink{group__socket_gd2216a950b5878a7480f2cbba5bb923a}{socket\_\-connect4} (int sock, const \hyperlink{structipv4addr}{ipv4addr} $\ast$ip, \hyperlink{group__ipv4_g113bbf93f3b0011263ce519bb1ca7481}{ipv4port} port)
\item 
int \hyperlink{group__socket_g758f2bc0d9366148f783e391b918c6e7}{socket\_\-connect4\_\-timeout} (int sock, const \hyperlink{structipv4addr}{ipv4addr} $\ast$ip, \hyperlink{group__ipv4_g113bbf93f3b0011263ce519bb1ca7481}{ipv4port} port, int timeout)
\item 
int \hyperlink{group__socket_g748c5c143180e767205d07f047ca679d}{socket\_\-connect6} (int sock, const \hyperlink{structipv6addr}{ipv6addr} $\ast$ip, \hyperlink{group__ipv6_ga71ffb8f46cd4fa830090d23eb752847}{ipv6port} port)
\item 
int \hyperlink{group__socket_gd0524d7851f2c470f69560eb84730c5b}{socket\_\-connect6\_\-timeout} (int sock, const \hyperlink{structipv6addr}{ipv6addr} $\ast$ip, \hyperlink{group__ipv6_ga71ffb8f46cd4fa830090d23eb752847}{ipv6port} port, int timeout)
\item 
int \hyperlink{group__socket_g456030863437a411c047f2cd2580bdc0}{socket\_\-bind4} (int sock, const \hyperlink{structipv4addr}{ipv4addr} $\ast$ip, \hyperlink{group__ipv4_g113bbf93f3b0011263ce519bb1ca7481}{ipv4port} port)
\item 
int \hyperlink{group__socket_g7a5368c8328a7dece54a854fb973f643}{socket\_\-bind6} (int sock, const \hyperlink{structipv6addr}{ipv6addr} $\ast$ip, \hyperlink{group__ipv6_ga71ffb8f46cd4fa830090d23eb752847}{ipv6port} port)
\item 
int \hyperlink{group__socket_gc7bc14346128667097799f4754d37929}{socket\_\-accept4} (int sock, \hyperlink{structipv4addr}{ipv4addr} $\ast$ip, \hyperlink{group__ipv4_g113bbf93f3b0011263ce519bb1ca7481}{ipv4port} $\ast$port)
\item 
int \hyperlink{group__socket_g196889012f2f3d11f509233255e2ac99}{socket\_\-accept6} (int sock, \hyperlink{structipv6addr}{ipv6addr} $\ast$ip, \hyperlink{group__ipv6_ga71ffb8f46cd4fa830090d23eb752847}{ipv6port} $\ast$port)
\item 
int \hyperlink{group__socket_g1a5ee61f2d55733cb8fd5b359d10a7a1}{socket\_\-recv4} (int sock, char $\ast$buffer, unsigned buflen, \hyperlink{structipv4addr}{ipv4addr} $\ast$ip, \hyperlink{group__ipv4_g113bbf93f3b0011263ce519bb1ca7481}{ipv4port} $\ast$port)
\item 
int \hyperlink{group__socket_gbd201f10a5f8a183a47f4c04094611f2}{socket\_\-recv6} (int sock, char $\ast$buffer, unsigned buflen, \hyperlink{structipv6addr}{ipv6addr} $\ast$ip, \hyperlink{group__ipv6_ga71ffb8f46cd4fa830090d23eb752847}{ipv6port} $\ast$port)
\item 
int \hyperlink{group__socket_g6c2d6ff938d1d397727eed25c7eec506}{socket\_\-send4} (int sock, const char $\ast$buffer, unsigned buflen, const \hyperlink{structipv4addr}{ipv4addr} $\ast$ip, \hyperlink{group__ipv4_g113bbf93f3b0011263ce519bb1ca7481}{ipv4port} port)
\item 
int \hyperlink{group__socket_g59f8b78cd870be6e55b0205ce69780b1}{socket\_\-send6} (int sock, const char $\ast$buffer, unsigned buflen, const \hyperlink{structipv6addr}{ipv6addr} $\ast$ip, \hyperlink{group__ipv6_ga71ffb8f46cd4fa830090d23eb752847}{ipv6port} port)
\item 
int \hyperlink{group__socket_g0af45ad3d942c5e666c6c849612b31b9}{socket\_\-getaddr4} (int sock, \hyperlink{structipv4addr}{ipv4addr} $\ast$ip, \hyperlink{group__ipv4_g113bbf93f3b0011263ce519bb1ca7481}{ipv4port} $\ast$port)
\item 
int \hyperlink{group__socket_g369bac4cc0a9f7b0102619c3c51c7b9b}{socket\_\-getaddr6} (int sock, \hyperlink{structipv6addr}{ipv6addr} $\ast$ip, \hyperlink{group__ipv6_ga71ffb8f46cd4fa830090d23eb752847}{ipv6port} $\ast$port)
\item 
int \hyperlink{group__socket_g9b04337ecf3bf5baa28b40452cd21222}{socket\_\-cork} (int sock)
\item 
int \hyperlink{group__socket_ge754518918db3d63dda03d9fd7497f24}{socket\_\-uncork} (int sock)
\item 
int \hyperlink{group__socket_g3e40999be94c2b893b7b143b6b15e85e}{socket\_\-notcpdelay} (int sock, int enable)
\end{CompactItemize}
\subsection*{UNIX local-domain socket functions}
\begin{CompactItemize}
\item 
int \hyperlink{group__socket_g3c74e521debc5d71da6cb975c24f5a6f}{socket\_\-unixdgm} (void)
\item 
int \hyperlink{group__socket_g8d8f154af4bc27c718676848aeca4517}{socket\_\-unixstr} (void)
\item 
int \hyperlink{group__socket_gba7a8b6004c3a3b4ec2760654b932d34}{socket\_\-connectu} (int sock, const char $\ast$path)
\item 
int \hyperlink{group__socket_g60efe220e9b4f32c40f1f23ee856f9f2}{socket\_\-connectu\_\-timeout} (int sock, const char $\ast$path, int timeout)
\item 
int \hyperlink{group__socket_gb8bb1362103f0b7d0b92a26740a25202}{socket\_\-bindu} (int sock, const char $\ast$path)
\item 
int \hyperlink{group__socket_g47526944d4d396e915254ad74b1718cd}{socket\_\-acceptu} (int sock)
\item 
int \hyperlink{group__socket_g4a076351ffd2c95067db1d480aad0d74}{socket\_\-recvu} (int sock, char $\ast$buffer, unsigned buflen)
\item 
int \hyperlink{group__socket_g2e1e867a59f55178bd91943937be27e8}{socket\_\-sendu} (int sock, const char $\ast$buffer, unsigned buflen)
\item 
int \hyperlink{group__socket_g2ee545eb11adc079c12653558ce1d43a}{socket\_\-pairstr} (int fd\mbox{[}2\mbox{]})
\item 
int \hyperlink{group__socket_g3518be90b2771241b0dd8330763f524a}{socket\_\-pairdgm} (int fd\mbox{[}2\mbox{]})
\end{CompactItemize}
\subsection*{Functions for any type of socket}
\begin{CompactItemize}
\item 
int \hyperlink{group__socket_g1cd775b2c588a9c1c9f993d760088e4c}{socket\_\-broadcast} (int sock)
\item 
int \hyperlink{group__socket_gbfc66cb9c05f20a016cec536293d391e}{socket\_\-connected} (int sock)
\item 
int \hyperlink{group__socket_g30b66242db4c2ac40b93f73bbe6d4add}{socket\_\-linger} (int fd, int onoff, int seconds)
\item 
int \hyperlink{group__socket_gdc9f509d40c47189452bbde14b5d4fee}{socket\_\-listen} (int sock, int backlog)
\item 
int \hyperlink{group__socket_g3836ac2b7108e2f6e203278c846ef56e}{socket\_\-reuse} (int sock)
\item 
int \hyperlink{group__socket_gc91dfda7ec1b043b277fdcd205eb79e8}{socket\_\-shutdown} (int sock, int shut\_\-rd, int shut\_\-wr)
\item 
int \hyperlink{group__socket_g0b2ab1619356b51c379c3b3cfd047bf9}{socket\_\-sendfd} (int sock, int fd)
\item 
int \hyperlink{group__socket_g45a3df16f6b78995662a5a3f485f5edb}{socket\_\-recvfd} (int sock)
\end{CompactItemize}


\subsection{Detailed Description}
\begin{Desc}
\item[Calling Convention]\end{Desc}
When calling a socket function, the socket file descriptor (where required) will always be the first parameter. Functions that return a file descriptor (either creating a new socket or accepting a connection on a socket return that file descriptor on success or {\tt -1} on error. All other functions return non-zero (true) on success or {\tt 0} (false) on error. All functions set errno on error. 

\subsection{Function Documentation}
\hypertarget{group__socket_gc7bc14346128667097799f4754d37929}{
\index{socket@{socket}!socket_accept4@{socket\_\-accept4}}
\index{socket_accept4@{socket\_\-accept4}!socket@{socket}}
\subsubsection[socket\_\-accept4]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-accept4 (int {\em sock}, \hyperlink{structipv4addr}{ipv4addr} $\ast$ {\em ip}, \hyperlink{group__ipv4_g113bbf93f3b0011263ce519bb1ca7481}{ipv4port} $\ast$ {\em port})}}
\label{group__socket_gc7bc14346128667097799f4754d37929}


Accept a connection on a socket from an IPv4 address. \hypertarget{group__socket_g196889012f2f3d11f509233255e2ac99}{
\index{socket@{socket}!socket_accept6@{socket\_\-accept6}}
\index{socket_accept6@{socket\_\-accept6}!socket@{socket}}
\subsubsection[socket\_\-accept6]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-accept6 (int {\em sock}, \hyperlink{structipv6addr}{ipv6addr} $\ast$ {\em ip}, \hyperlink{group__ipv6_ga71ffb8f46cd4fa830090d23eb752847}{ipv6port} $\ast$ {\em port})}}
\label{group__socket_g196889012f2f3d11f509233255e2ac99}


Accept a connection on a socket from an IPv6 address. \hypertarget{group__socket_g47526944d4d396e915254ad74b1718cd}{
\index{socket@{socket}!socket_acceptu@{socket\_\-acceptu}}
\index{socket_acceptu@{socket\_\-acceptu}!socket@{socket}}
\subsubsection[socket\_\-acceptu]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-acceptu (int {\em sock})}}
\label{group__socket_g47526944d4d396e915254ad74b1718cd}


Accept a UNIX domain connection. \hypertarget{group__socket_g456030863437a411c047f2cd2580bdc0}{
\index{socket@{socket}!socket_bind4@{socket\_\-bind4}}
\index{socket_bind4@{socket\_\-bind4}!socket@{socket}}
\subsubsection[socket\_\-bind4]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-bind4 (int {\em sock}, const \hyperlink{structipv4addr}{ipv4addr} $\ast$ {\em ip}, \hyperlink{group__ipv4_g113bbf93f3b0011263ce519bb1ca7481}{ipv4port} {\em port})}}
\label{group__socket_g456030863437a411c047f2cd2580bdc0}


Bind a socket to an IPv4 address. \hypertarget{group__socket_g7a5368c8328a7dece54a854fb973f643}{
\index{socket@{socket}!socket_bind6@{socket\_\-bind6}}
\index{socket_bind6@{socket\_\-bind6}!socket@{socket}}
\subsubsection[socket\_\-bind6]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-bind6 (int {\em sock}, const \hyperlink{structipv6addr}{ipv6addr} $\ast$ {\em ip}, \hyperlink{group__ipv6_ga71ffb8f46cd4fa830090d23eb752847}{ipv6port} {\em port})}}
\label{group__socket_g7a5368c8328a7dece54a854fb973f643}


Bind a socket to an IPv6 address. \hypertarget{group__socket_gb8bb1362103f0b7d0b92a26740a25202}{
\index{socket@{socket}!socket_bindu@{socket\_\-bindu}}
\index{socket_bindu@{socket\_\-bindu}!socket@{socket}}
\subsubsection[socket\_\-bindu]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-bindu (int {\em sock}, const char $\ast$ {\em path})}}
\label{group__socket_gb8bb1362103f0b7d0b92a26740a25202}


Bind a UNIX domain address (path) to a socket. \hypertarget{group__socket_g1cd775b2c588a9c1c9f993d760088e4c}{
\index{socket@{socket}!socket_broadcast@{socket\_\-broadcast}}
\index{socket_broadcast@{socket\_\-broadcast}!socket@{socket}}
\subsubsection[socket\_\-broadcast]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-broadcast (int {\em fd})}}
\label{group__socket_g1cd775b2c588a9c1c9f993d760088e4c}


Mark a socket for broadcast transmission. \hypertarget{group__socket_gd2216a950b5878a7480f2cbba5bb923a}{
\index{socket@{socket}!socket_connect4@{socket\_\-connect4}}
\index{socket_connect4@{socket\_\-connect4}!socket@{socket}}
\subsubsection[socket\_\-connect4]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-connect4 (int {\em sock}, const \hyperlink{structipv4addr}{ipv4addr} $\ast$ {\em ip}, \hyperlink{group__ipv4_g113bbf93f3b0011263ce519bb1ca7481}{ipv4port} {\em port})}}
\label{group__socket_gd2216a950b5878a7480f2cbba5bb923a}


Connect a socket to an IPv4 address. \hypertarget{group__socket_g758f2bc0d9366148f783e391b918c6e7}{
\index{socket@{socket}!socket_connect4_timeout@{socket\_\-connect4\_\-timeout}}
\index{socket_connect4_timeout@{socket\_\-connect4\_\-timeout}!socket@{socket}}
\subsubsection[socket\_\-connect4\_\-timeout]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-connect4\_\-timeout (int {\em sock}, const \hyperlink{structipv4addr}{ipv4addr} $\ast$ {\em ip}, \hyperlink{group__ipv4_g113bbf93f3b0011263ce519bb1ca7481}{ipv4port} {\em port}, int {\em timeout})}}
\label{group__socket_g758f2bc0d9366148f783e391b918c6e7}


Connect a socket to an IPv4 address, honouring a timeout.

\begin{Desc}
\item[Note:]The socket will have nonblocking mode turned on on return from this function. \end{Desc}
\hypertarget{group__socket_g748c5c143180e767205d07f047ca679d}{
\index{socket@{socket}!socket_connect6@{socket\_\-connect6}}
\index{socket_connect6@{socket\_\-connect6}!socket@{socket}}
\subsubsection[socket\_\-connect6]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-connect6 (int {\em sock}, const \hyperlink{structipv6addr}{ipv6addr} $\ast$ {\em ip}, \hyperlink{group__ipv6_ga71ffb8f46cd4fa830090d23eb752847}{ipv6port} {\em port})}}
\label{group__socket_g748c5c143180e767205d07f047ca679d}


Connect a socket to an IPv6 address. \hypertarget{group__socket_gd0524d7851f2c470f69560eb84730c5b}{
\index{socket@{socket}!socket_connect6_timeout@{socket\_\-connect6\_\-timeout}}
\index{socket_connect6_timeout@{socket\_\-connect6\_\-timeout}!socket@{socket}}
\subsubsection[socket\_\-connect6\_\-timeout]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-connect6\_\-timeout (int {\em sock}, const \hyperlink{structipv6addr}{ipv6addr} $\ast$ {\em ip}, \hyperlink{group__ipv6_ga71ffb8f46cd4fa830090d23eb752847}{ipv6port} {\em port}, int {\em timeout})}}
\label{group__socket_gd0524d7851f2c470f69560eb84730c5b}


Connect a socket to an IPv6 address, honouring a timeout.

\begin{Desc}
\item[Note:]The socket will have nonblocking mode turned on on return from this function. \end{Desc}
\hypertarget{group__socket_gbfc66cb9c05f20a016cec536293d391e}{
\index{socket@{socket}!socket_connected@{socket\_\-connected}}
\index{socket_connected@{socket\_\-connected}!socket@{socket}}
\subsubsection[socket\_\-connected]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-connected (int {\em sock})}}
\label{group__socket_gbfc66cb9c05f20a016cec536293d391e}


Test if a socket is connected. \hypertarget{group__socket_gba7a8b6004c3a3b4ec2760654b932d34}{
\index{socket@{socket}!socket_connectu@{socket\_\-connectu}}
\index{socket_connectu@{socket\_\-connectu}!socket@{socket}}
\subsubsection[socket\_\-connectu]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-connectu (int {\em sock}, const char $\ast$ {\em path})}}
\label{group__socket_gba7a8b6004c3a3b4ec2760654b932d34}


Make an UNIX domain connection. \hypertarget{group__socket_g60efe220e9b4f32c40f1f23ee856f9f2}{
\index{socket@{socket}!socket_connectu_timeout@{socket\_\-connectu\_\-timeout}}
\index{socket_connectu_timeout@{socket\_\-connectu\_\-timeout}!socket@{socket}}
\subsubsection[socket\_\-connectu\_\-timeout]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-connectu\_\-timeout (int {\em sock}, const char $\ast$ {\em path}, int {\em timeout})}}
\label{group__socket_g60efe220e9b4f32c40f1f23ee856f9f2}


Connect a socket to an UNIX domain address, honouring a timeout.

\begin{Desc}
\item[Note:]The socket will have nonblocking mode turned on on return from this function. \end{Desc}
\hypertarget{group__socket_g9b04337ecf3bf5baa28b40452cd21222}{
\index{socket@{socket}!socket_cork@{socket\_\-cork}}
\index{socket_cork@{socket\_\-cork}!socket@{socket}}
\subsubsection[socket\_\-cork]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-cork (int {\em sock})}}
\label{group__socket_g9b04337ecf3bf5baa28b40452cd21222}


Stop a TCP socket from sending short writes.

Several UNIX OS's have a facility which can prevent packets from being sent across the wire until they are completely full, even if short writes are sent to the socket that would normally result in output packets. This routine attempts to enable that facility to optimize throughput for bulk data transfers. It is known to work on Linux (with the {\tt TCP\_\-CORK} option) and to at least compile on BSD (with the {\tt TCP\_\-NOPUSH} option). On OS's which lack either of these two options, this function is essentially a no-op. \hypertarget{group__socket_g0af45ad3d942c5e666c6c849612b31b9}{
\index{socket@{socket}!socket_getaddr4@{socket\_\-getaddr4}}
\index{socket_getaddr4@{socket\_\-getaddr4}!socket@{socket}}
\subsubsection[socket\_\-getaddr4]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-getaddr4 (int {\em sock}, \hyperlink{structipv4addr}{ipv4addr} $\ast$ {\em addr}, \hyperlink{group__ipv4_g113bbf93f3b0011263ce519bb1ca7481}{ipv4port} $\ast$ {\em port})}}
\label{group__socket_g0af45ad3d942c5e666c6c849612b31b9}


Determine the IPv4 address of a socket. \hypertarget{group__socket_g369bac4cc0a9f7b0102619c3c51c7b9b}{
\index{socket@{socket}!socket_getaddr6@{socket\_\-getaddr6}}
\index{socket_getaddr6@{socket\_\-getaddr6}!socket@{socket}}
\subsubsection[socket\_\-getaddr6]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-getaddr6 (int {\em sock}, \hyperlink{structipv6addr}{ipv6addr} $\ast$ {\em addr}, \hyperlink{group__ipv6_ga71ffb8f46cd4fa830090d23eb752847}{ipv6port} $\ast$ {\em port})}}
\label{group__socket_g369bac4cc0a9f7b0102619c3c51c7b9b}


Determine the IPv6 address of a socket. \hypertarget{group__socket_g30b66242db4c2ac40b93f73bbe6d4add}{
\index{socket@{socket}!socket_linger@{socket\_\-linger}}
\index{socket_linger@{socket\_\-linger}!socket@{socket}}
\subsubsection[socket\_\-linger]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-linger (int {\em fd}, int {\em onoff}, int {\em seconds})}}
\label{group__socket_g30b66242db4c2ac40b93f73bbe6d4add}


Set the socket \char`\"{}linger\char`\"{} option. \hypertarget{group__socket_gdc9f509d40c47189452bbde14b5d4fee}{
\index{socket@{socket}!socket_listen@{socket\_\-listen}}
\index{socket_listen@{socket\_\-listen}!socket@{socket}}
\subsubsection[socket\_\-listen]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-listen (int {\em sock}, int {\em backlog})}}
\label{group__socket_gdc9f509d40c47189452bbde14b5d4fee}


Listen to a socket. \hypertarget{group__socket_g3e40999be94c2b893b7b143b6b15e85e}{
\index{socket@{socket}!socket_notcpdelay@{socket\_\-notcpdelay}}
\index{socket_notcpdelay@{socket\_\-notcpdelay}!socket@{socket}}
\subsubsection[socket\_\-notcpdelay]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-notcpdelay (int {\em fd}, int {\em on})}}
\label{group__socket_g3e40999be94c2b893b7b143b6b15e85e}


Turn on or off TCP NODELAY flag.

Enabling NODELAY disables the standard Nagle algorithm, which tries to coalesce multiple short writes into one larger packet for better network efficiency. With NODELAY enabled, each write will immediately be sent out onto the network as a seperate packet. \hypertarget{group__socket_g3518be90b2771241b0dd8330763f524a}{
\index{socket@{socket}!socket_pairdgm@{socket\_\-pairdgm}}
\index{socket_pairdgm@{socket\_\-pairdgm}!socket@{socket}}
\subsubsection[socket\_\-pairdgm]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-pairdgm (int {\em fd}\mbox{[}2\mbox{]})}}
\label{group__socket_g3518be90b2771241b0dd8330763f524a}


Create a pair of datagram sockets. \hypertarget{group__socket_g2ee545eb11adc079c12653558ce1d43a}{
\index{socket@{socket}!socket_pairstr@{socket\_\-pairstr}}
\index{socket_pairstr@{socket\_\-pairstr}!socket@{socket}}
\subsubsection[socket\_\-pairstr]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-pairstr (int {\em fd}\mbox{[}2\mbox{]})}}
\label{group__socket_g2ee545eb11adc079c12653558ce1d43a}


Create a pair of stream sockets. \hypertarget{group__socket_g1a5ee61f2d55733cb8fd5b359d10a7a1}{
\index{socket@{socket}!socket_recv4@{socket\_\-recv4}}
\index{socket_recv4@{socket\_\-recv4}!socket@{socket}}
\subsubsection[socket\_\-recv4]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-recv4 (int {\em sock}, char $\ast$ {\em buffer}, unsigned {\em buflen}, \hyperlink{structipv4addr}{ipv4addr} $\ast$ {\em ip}, \hyperlink{group__ipv4_g113bbf93f3b0011263ce519bb1ca7481}{ipv4port} $\ast$ {\em port})}}
\label{group__socket_g1a5ee61f2d55733cb8fd5b359d10a7a1}


Receive a datagram from a UDP socket. \hypertarget{group__socket_gbd201f10a5f8a183a47f4c04094611f2}{
\index{socket@{socket}!socket_recv6@{socket\_\-recv6}}
\index{socket_recv6@{socket\_\-recv6}!socket@{socket}}
\subsubsection[socket\_\-recv6]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-recv6 (int {\em sock}, char $\ast$ {\em buffer}, unsigned {\em buflen}, \hyperlink{structipv6addr}{ipv6addr} $\ast$ {\em ip}, \hyperlink{group__ipv6_ga71ffb8f46cd4fa830090d23eb752847}{ipv6port} $\ast$ {\em port})}}
\label{group__socket_gbd201f10a5f8a183a47f4c04094611f2}


Receive a datagram from an IPv6 UDP socket. \hypertarget{group__socket_g45a3df16f6b78995662a5a3f485f5edb}{
\index{socket@{socket}!socket_recvfd@{socket\_\-recvfd}}
\index{socket_recvfd@{socket\_\-recvfd}!socket@{socket}}
\subsubsection[socket\_\-recvfd]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-recvfd (int {\em sock})}}
\label{group__socket_g45a3df16f6b78995662a5a3f485f5edb}


Receive a file descriptor over a socket. \hypertarget{group__socket_g4a076351ffd2c95067db1d480aad0d74}{
\index{socket@{socket}!socket_recvu@{socket\_\-recvu}}
\index{socket_recvu@{socket\_\-recvu}!socket@{socket}}
\subsubsection[socket\_\-recvu]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-recvu (int {\em sock}, char $\ast$ {\em buffer}, unsigned {\em buflen})}}
\label{group__socket_g4a076351ffd2c95067db1d480aad0d74}


Receive a datagram from a UNIX domain socket. \hypertarget{group__socket_g3836ac2b7108e2f6e203278c846ef56e}{
\index{socket@{socket}!socket_reuse@{socket\_\-reuse}}
\index{socket_reuse@{socket\_\-reuse}!socket@{socket}}
\subsubsection[socket\_\-reuse]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-reuse (int {\em fd})}}
\label{group__socket_g3836ac2b7108e2f6e203278c846ef56e}


Mark a socket for address reuse. \hypertarget{group__socket_g6c2d6ff938d1d397727eed25c7eec506}{
\index{socket@{socket}!socket_send4@{socket\_\-send4}}
\index{socket_send4@{socket\_\-send4}!socket@{socket}}
\subsubsection[socket\_\-send4]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-send4 (int {\em sock}, const char $\ast$ {\em buffer}, unsigned {\em buflen}, const \hyperlink{structipv4addr}{ipv4addr} $\ast$ {\em ip}, \hyperlink{group__ipv4_g113bbf93f3b0011263ce519bb1ca7481}{ipv4port} {\em port})}}
\label{group__socket_g6c2d6ff938d1d397727eed25c7eec506}


Send a datagram on a UDP socket. \hypertarget{group__socket_g59f8b78cd870be6e55b0205ce69780b1}{
\index{socket@{socket}!socket_send6@{socket\_\-send6}}
\index{socket_send6@{socket\_\-send6}!socket@{socket}}
\subsubsection[socket\_\-send6]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-send6 (int {\em sock}, const char $\ast$ {\em buffer}, unsigned {\em buflen}, const \hyperlink{structipv6addr}{ipv6addr} $\ast$ {\em ip}, \hyperlink{group__ipv6_ga71ffb8f46cd4fa830090d23eb752847}{ipv6port} {\em port})}}
\label{group__socket_g59f8b78cd870be6e55b0205ce69780b1}


Send a datagram on an IPv6 UDP socket. \hypertarget{group__socket_g0b2ab1619356b51c379c3b3cfd047bf9}{
\index{socket@{socket}!socket_sendfd@{socket\_\-sendfd}}
\index{socket_sendfd@{socket\_\-sendfd}!socket@{socket}}
\subsubsection[socket\_\-sendfd]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-sendfd (int {\em sock}, int {\em fd})}}
\label{group__socket_g0b2ab1619356b51c379c3b3cfd047bf9}


Send a file descriptor over a socket. \hypertarget{group__socket_g2e1e867a59f55178bd91943937be27e8}{
\index{socket@{socket}!socket_sendu@{socket\_\-sendu}}
\index{socket_sendu@{socket\_\-sendu}!socket@{socket}}
\subsubsection[socket\_\-sendu]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-sendu (int {\em sock}, const char $\ast$ {\em buffer}, unsigned {\em buflen})}}
\label{group__socket_g2e1e867a59f55178bd91943937be27e8}


Send a datagram on a UNIX domain socket. \hypertarget{group__socket_gc91dfda7ec1b043b277fdcd205eb79e8}{
\index{socket@{socket}!socket_shutdown@{socket\_\-shutdown}}
\index{socket_shutdown@{socket\_\-shutdown}!socket@{socket}}
\subsubsection[socket\_\-shutdown]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-shutdown (int {\em sock}, int {\em shut\_\-rd}, int {\em shut\_\-wr})}}
\label{group__socket_gc91dfda7ec1b043b277fdcd205eb79e8}


Shut down part or all of a socket. \hypertarget{group__socket_g88d576380c2025501e9a8266bcddc759}{
\index{socket@{socket}!socket_tcp@{socket\_\-tcp}}
\index{socket_tcp@{socket\_\-tcp}!socket@{socket}}
\subsubsection[socket\_\-tcp]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-tcp (void)}}
\label{group__socket_g88d576380c2025501e9a8266bcddc759}


Create a TCP/IP socket. \hypertarget{group__socket_gc3ff4662c65f65784534be54ef73a5c1}{
\index{socket@{socket}!socket_tcp4@{socket\_\-tcp4}}
\index{socket_tcp4@{socket\_\-tcp4}!socket@{socket}}
\subsubsection[socket\_\-tcp4]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-tcp4 (void)}}
\label{group__socket_gc3ff4662c65f65784534be54ef73a5c1}


Create a TCP/IPv4 socket. \hypertarget{group__socket_ga40101a7969252728f0f29a7b40afbb0}{
\index{socket@{socket}!socket_tcp6@{socket\_\-tcp6}}
\index{socket_tcp6@{socket\_\-tcp6}!socket@{socket}}
\subsubsection[socket\_\-tcp6]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-tcp6 (void)}}
\label{group__socket_ga40101a7969252728f0f29a7b40afbb0}


Create a TCP/IPv6 socket. \hypertarget{group__socket_gaa146f612229109460767f7b33264436}{
\index{socket@{socket}!socket_udp@{socket\_\-udp}}
\index{socket_udp@{socket\_\-udp}!socket@{socket}}
\subsubsection[socket\_\-udp]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-udp (void)}}
\label{group__socket_gaa146f612229109460767f7b33264436}


Create a UDP/IP socket. \hypertarget{group__socket_g6f5bd2aa2b03be301bdd402a96d8c1cc}{
\index{socket@{socket}!socket_udp4@{socket\_\-udp4}}
\index{socket_udp4@{socket\_\-udp4}!socket@{socket}}
\subsubsection[socket\_\-udp4]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-udp4 (void)}}
\label{group__socket_g6f5bd2aa2b03be301bdd402a96d8c1cc}


Create a UDP/IPv4 socket. \hypertarget{group__socket_g97257e7446c72c21b3b80b56efae5114}{
\index{socket@{socket}!socket_udp6@{socket\_\-udp6}}
\index{socket_udp6@{socket\_\-udp6}!socket@{socket}}
\subsubsection[socket\_\-udp6]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-udp6 (void)}}
\label{group__socket_g97257e7446c72c21b3b80b56efae5114}


Create a UDP/IPv6 socket. \hypertarget{group__socket_ge754518918db3d63dda03d9fd7497f24}{
\index{socket@{socket}!socket_uncork@{socket\_\-uncork}}
\index{socket_uncork@{socket\_\-uncork}!socket@{socket}}
\subsubsection[socket\_\-uncork]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-uncork (int {\em sock})}}
\label{group__socket_ge754518918db3d63dda03d9fd7497f24}


Unstop a TCP socket from sending short writes. \hypertarget{group__socket_g3c74e521debc5d71da6cb975c24f5a6f}{
\index{socket@{socket}!socket_unixdgm@{socket\_\-unixdgm}}
\index{socket_unixdgm@{socket\_\-unixdgm}!socket@{socket}}
\subsubsection[socket\_\-unixdgm]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-unixdgm (void)}}
\label{group__socket_g3c74e521debc5d71da6cb975c24f5a6f}


Create UNIX domain datagram socket. \hypertarget{group__socket_g8d8f154af4bc27c718676848aeca4517}{
\index{socket@{socket}!socket_unixstr@{socket\_\-unixstr}}
\index{socket_unixstr@{socket\_\-unixstr}!socket@{socket}}
\subsubsection[socket\_\-unixstr]{\setlength{\rightskip}{0pt plus 5cm}int socket\_\-unixstr (void)}}
\label{group__socket_g8d8f154af4bc27c718676848aeca4517}


Create UNIX domain stream socket. 