SocketAddress.toNative

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 gio.types.IOErrorEnum.NoSpace error is returned. If the address type is not known on the system then a gio.types.IOErrorEnum.NotSupported 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 gio.socket_address.SocketAddress.getNativeSize

Return Value

Type: bool

true if dest was filled in, false on error