Method
GioSocketAddressto_native
since: 2.22
Declaration
gboolean
g_socket_address_to_native (
GSocketAddress* address,
gpointer dest,
gsize destlen,
GError** error
)
Description
Converts a GSocketAddress to a native struct sockaddr, which can
be passed to low-level functions like connect() or bind().
If not enough space is available, a G_IO_ERROR_NO_SPACE error
is returned. If the address type is not known on the system
then a G_IO_ERROR_NOT_SUPPORTED error is returned.
Available since: 2.22
Parameters
dest-
Type:
gpointerA pointer to a memory location that will contain the native struct sockaddr.
The argument can be NULL.The data is owned by the caller of the method. destlen-
Type:
gsizeThe size of
dest. Must be at least as large asg_socket_address_get_native_size() error-
Type:
GError **The return location for a recoverable error.
The argument can be NULL.If the return location is not NULL, then you must initialize it to aNULLGError*.The argument will be left initialized to NULLby the method if there are no errors.In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.