NativeSocketAddress

A socket address of some unknown native type.

This corresponds to a general struct sockaddr of a type not otherwise handled by GLib.

class NativeSocketAddress : SocketAddress {}

Constructors

this
this(void* native, size_t len)

Creates a new #GNativeSocketAddress for native and len.

Inherited Members

From SocketAddress

newFromNative
gio.socket_address.SocketAddress newFromNative(void* native, size_t len)

Creates a #GSocketAddress subclass corresponding to the native struct sockaddr native.

getFamily
gio.types.SocketFamily getFamily()

Gets the socket family type of address.

getNativeSize
ptrdiff_t getNativeSize()

Gets the size of address's native struct sockaddr. You can use this to allocate memory to pass to gio.socket_address.SocketAddress.toNative.

toNative
bool toNative(void* dest, size_t destlen)

Converts a #GSocketAddress to a native struct sockaddr, which can be passed to low-level functions like connect() or bind().