### Class

# Gio UnixSocketAddress

#### Description

    class Gio.UnixSocketAddress : Gio.SocketAddress
      implements Gio.SocketConnectable {
      /* No available fields */
    }

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 `G_IO_ERROR_NOT_SUPPORTED` errors. You can use `g_unix_socket_address_abstract_names_supported()` to see if abstract names are supported.

Since GLib 2.72, `GUnixSocketAddress` 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.

#### Ancestors

- GSocketAddress
- GObject

#### Implements

- GSocketConnectable

#### Constructors

###### g_unix_socket_address_new

Creates a new `GUnixSocketAddress` for `path`.

since: 2.22

###### g_unix_socket_address_new_abstract

Creates a new `G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED` `GUnixSocketAddress` for `path`.

deprecated: Unknown

###### g_unix_socket_address_new_with_type

Creates a new `GUnixSocketAddress` of type `type` with name `path`.

since: 2.26

#### Functions

###### g_unix_socket_address_abstract_names_supported

Checks if abstract UNIX domain socket names are supported.

since: 2.22

#### Instance methods

###### g_unix_socket_address_get_address_type

Gets `address`‘s type.

since: 2.26

###### g_unix_socket_address_get_is_abstract

Tests if `address` is abstract.

deprecated: Unknown since: 2.22

###### g_unix_socket_address_get_path

Gets `address`‘s path, or for abstract sockets the “name”.

since: 2.22

###### g_unix_socket_address_get_path_len

Gets the length of `address`‘s path.

since: 2.22

##### Methods inherited from GSocketAddress (3)

###### g_socket_address_get_family

Gets the socket family type of `address`.

since: 2.22

###### g_socket_address_get_native_size

Gets the size of `address`‘s native struct sockaddr. You can use this to allocate memory to pass to g_socket_address_to_native().

since: 2.22

###### g_socket_address_to_native

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

since: 2.22

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

##### Methods inherited from GSocketConnectable (3)

###### g_socket_connectable_enumerate

Creates a `GSocketAddressEnumerator` for `connectable`.

since: 2.22

###### g_socket_connectable_proxy_enumerate

Creates a `GSocketAddressEnumerator` for `connectable` that will return a `GProxyAddress` for each of its addresses that you must connect to via a proxy.

since: 2.26

###### g_socket_connectable_to_string

Format a `GSocketConnectable` as a string. This is a human-readable format for use in debugging output, and is not a stable serialization format. It is not suitable for use in user interfaces as it exposes too much information for a user.

since: 2.48

#### Properties

###### Gio.UnixSocketAddress:abstract

Whether or not this is an abstract address.

deprecated: Unknown

###### Gio.UnixSocketAddress:address-type

The type of Unix socket address.

since: 2.22

###### Gio.UnixSocketAddress:path

Unix socket path.

since: 2.22

###### Gio.UnixSocketAddress:path-as-array

Unix socket path, as a byte array.

since: 2.22

##### Properties inherited from GSocketAddress (1)

###### Gio.SocketAddress:family

The family of the socket address.

since: 2.22

#### Signals

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct GioUnixSocketAddressClass {
      GSocketAddressClass parent_class;

    }

No description available.

###### Class members

`parent_class: GSocketAddressClass`

  No description available.