sockaddr_to_string2
Last updated March 2020
Name
sockaddr_to_string2 — Renders a socket address into human-readable form
Synopsis
#include "netlistener.h"
| int **sockaddr_to_string2** (
| sa, | |
| | buffer, | |
| | buf_size)
; | |
struct sockaddr * <var class="pdparam">sa</var>
;
char * <var class="pdparam">buffer</var>
;
int <var class="pdparam">buf_size</var>
;
Description
Renders the socket address to human-readable form. Uses the provided buffer to render the socket address to a string.
- sa
-
The socket address.
- buffer
-
The target for the human-readable form of the socket address.
Warning
This must not be
NULL
. - buf_size
-
The buffer length, in bytes.
Returns the length of the rendered form of the socket address.
It is legal to call this function in any thread.
See Also
Was this page helpful?