SocketAddress.toNative

Converts a gio.SocketAddress 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.

class SocketAddress
bool
toNative
(
void* dest
,
size_t destlen
)

Parameters

dest void*

a pointer to a memory location that will contain the native struct sockaddr

destlen size_t

the size of dest. Must be at least as large as Socket.addressGetNativeSize

Return Value

Type: bool

TRUE if dest was filled in, FALSE on error

Throws

GException on failure.

Meta

Since

2.22