to_native


Description:

[ Version ( since = "2.22" ) ]
public virtual bool to_native (void* dest, size_t destlen) throws Error

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

Parameters:

this

a SocketAddress

dest

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

destlen

the size of dest. Must be at least as large as get_native_size

Returns:

true if dest was filled in, false on error