gio.unix_credentials_message

Module for [UnixCredentialsMessage] class

Types 3

This gio.socket_control_message.SocketControlMessage contains a gio.credentials.Credentials instance. It may be sent using gio.socket.Socket.sendMessage and received using gio.socket.Socket.receiveMessage over UNIX sockets (ie: sockets in the gio.types.SocketFamily.Unix family).

For an easier way to send and receive credentials over stream-oriented UNIX sockets, see gio.unix_connection.UnixConnection.sendCredentials and gio.unix_connection.UnixConnection.receiveCredentials. To receive credentials of a foreign process connected to a socket, use gio.socket.Socket.getCredentials.

Since GLib 2.72, GUnixCredentialMessage 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/gunixcredentialsmessage.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
UnixCredentialsMessage self() nothrowReturns `this`, for use in `with` statements.
UnixCredentialsMessageGidBuilder builder() static nothrowGet builder for [gio.unix_credentials_message.UnixCredentialsMessage] Returns: New builder object
gio.credentials.Credentials credentials() @property nothrowGet `credentials` property. Returns: The credentials stored in the message.
gio.unix_credentials_message.UnixCredentialsMessage newWithCredentials(gio.credentials.Credentials credentials) static nothrowCreates a new #GUnixCredentialsMessage holding credentials.
bool isSupported() static nothrowChecks if passing #GCredentials on a #GSocket is supported on this platform. Returns: true if supported, false otherwise
gio.credentials.Credentials getCredentials() nothrowGets the credentials stored in message. Returns: A #GCredentials instance. Do not free, it is owned by message.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new #GUnixCredentialsMessage with credentials matching the current processes. Returns: a new #GUnixCredentialsMessage

Fluent builder implementation template for gio.unix_credentials_message.UnixCredentialsMessage

Methods
T credentials(gio.credentials.Credentials propval) nothrowSet `credentials` property. Params: propval = The credentials stored in the message. Returns: Builder instance for fluent chaining