W Wrapl, The Programming Language




Inherits from:

T is the equivalent of struct sockaddr in the BSD sockets API. This is an abstract class; use Gtk.Gio.GInetSocketAddress.T for internet sockets, or GUnixSocketAddress for UNIX domain sockets.


Nil : T


GetType() : Gtk.GObject.Type.T

NewFromNative(native @ Std.Address.T, len @ Std.Integer.SmallT) : Gtk.Gio.GSocketAddress.T

Creates a T subclass corresponding to the native struct sockaddr native.

native a pointer to a struct sockaddr
len the size of the memory location pointed to by native
Returns a new T if native could successfully be converted, otherwise NULL.


:GetFamily(self @ T) : Gtk.Gio.GSocketFamily.T

Gets the socket family type of address.

address a T
Returns the socket family type of address.

:GetNativeSize(self @ T) : Std.Integer.SmallT

Gets the size of address's native struct sockaddr. You can use this to allocate memory to pass to ToNative.

address a T
Returns the size of the native struct sockaddr that address represents

:ToNative(self @ T, dest @ Std.Address.T, destlen @ Std.Integer.SmallT, error @ Std.Object.T) : Std.Symbol.T

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

If not enough space is available, a Gtk.Gio.GIOErrorEnum.NoSpace error is returned. If the address type is not known on the system then a Gtk.Gio.GIOErrorEnum.NotSupported error is returned.

address a T
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 GetNativeSize.
error Gtk.Glib.GError.T for error reporting, or NULL to ignore.
Returns TRUE if dest was filled in, FALSE on error