Gio.SocketAddress.prototype.to_native
function to_native(dest: void, destlen: Number(gsize)): Boolean { // Gjs wrapper for g_socket_address_to_native() }
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 Gio.IOErrorEnum.no_space error is returned. If the address type is not known on the system then a Gio.IOErrorEnum.not_supported error is returned.
Since 2.22
- 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 Gio.SocketAddress.prototype.get_native_size
- Returns
true if dest was filled in, false on error