gio.unix_socket_address

Module for [UnixSocketAddress] class

Types 3

Support for UNIX-domain (also known as local) sockets, corresponding to struct sockaddr_un.

UNIX domain sockets are generally visible in the filesystem. However, some systems support abstract socket names which are not visible in the filesystem and not affected by the filesystem permissions, visibility, etc. Currently this is only supported under Linux. If you attempt to use abstract sockets on other systems, function calls may return gio.types.IOErrorEnum.NotSupported errors. You can use gio.unix_socket_address.UnixSocketAddress.abstractNamesSupported to see if abstract names are supported.

Since GLib 2.72, gio.unix_socket_address.UnixSocketAddress is available on all platforms. It requires underlying system support (such as Windows 10 with AF_UNIX) at run time.

Before GLib 2.72, <gio/gunixsocketaddress.h> belonged to the UNIX-specific GIO interfaces, thus you had to use the gio-unix-2.0.pc pkg-config file when using it. This is no longer necessary since GLib 2.72.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
UnixSocketAddress self() nothrowReturns `this`, for use in `with` statements.
UnixSocketAddressGidBuilder builder() static nothrowGet builder for [gio.unix_socket_address.UnixSocketAddress] Returns: New builder object
bool abstract_() @property nothrowGet `abstract_` property. Returns: Whether or not this is an abstract address
gio.types.UnixSocketAddressType addressType() @property nothrowGet `addressType` property. Returns: The type of Unix socket address.
string path() @property nothrowGet `path` property. Returns: Unix socket path.
gio.unix_socket_address.UnixSocketAddress newAbstract(string path) static nothrowCreates a new [gio.types.UnixSocketAddressType.AbstractPadded] #GUnixSocketAddress for path.
gio.unix_socket_address.UnixSocketAddress newWithType(string path, gio.types.UnixSocketAddressType type) static nothrowCreates a new #GUnixSocketAddress of type type with name path.
bool abstractNamesSupported() static nothrowChecks if abstract UNIX domain socket names are supported. Returns: true if supported, false otherwise
gio.types.UnixSocketAddressType getAddressType() nothrowGets address's type. Returns: a #GUnixSocketAddressType
bool getIsAbstract() nothrowTests if address is abstract. Returns: true if the address is abstract, false otherwise
string getPath() nothrowGets address's path, or for abstract sockets the "name".
size_t getPathLen() nothrowGets the length of address's path.
Constructors
this(void * ptr, Flag!"Take" take)
this(string path)Creates a new #GUnixSocketAddress for path.

Fluent builder implementation template for gio.unix_socket_address.UnixSocketAddress

Methods
T abstract_(bool propval) nothrowSet `abstract_` property. Params: propval = Whether or not this is an abstract address Returns: Builder instance for fluent chaining
T addressType(gio.types.UnixSocketAddressType propval) nothrowSet `addressType` property. Params: propval = The type of Unix socket address. Returns: Builder instance for fluent chaining
T path(string propval) nothrowSet `path` property. Params: propval = Unix socket path. Returns: Builder instance for fluent chaining