gio.unix_connection
Module for [UnixConnection] class
Types 3
This is the subclass of [gio.socket_connection.SocketConnection] that is created for UNIX domain sockets.
It contains functions to do some of the UNIX socket specific functionality like passing file descriptors.
Since GLib 2.72, [gio.unix_connection.UnixConnection] 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/gunixconnection.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
UnixConnection self()Returns `this`, for use in `with` statements.UnixConnectionGidBuilder builder()Get builder for [gio.unix_connection.UnixConnection] Returns: New builder objectgio.credentials.Credentials receiveCredentials(gio.cancellable.Cancellable cancellable = null)Receives credentials from the sending end of the connection. The sending end has to call [gio.unix_connection.UnixConnection.sendCredentials] (or similar) for this to work.void receiveCredentialsAsync(gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)Asynchronously receive credentials.gio.credentials.Credentials receiveCredentialsFinish(gio.async_result.AsyncResult result)Finishes an asynchronous receive credentials operation started with [gio.unix_connection.UnixConnection.receiveCredentialsAsync].int receiveFd(gio.cancellable.Cancellable cancellable = null)Receives a file descriptor from the sending end of the connection. The sending end has to call [gio.unix_connection.UnixConnection.sendFd] for this to work.bool sendCredentials(gio.cancellable.Cancellable cancellable = null)Passes the credentials of the current user the receiving side of the connection. The receiving end has to call [gio.unix_connection.UnixConnection.receiveCredentials] (or similar) to accept the cre...void sendCredentialsAsync(gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)Asynchronously send credentials.bool sendCredentialsFinish(gio.async_result.AsyncResult result)Finishes an asynchronous send credentials operation started with [gio.unix_connection.UnixConnection.sendCredentialsAsync].bool sendFd(int fd, gio.cancellable.Cancellable cancellable = null)Passes a file descriptor to the receiving side of the connection. The receiving end has to call [gio.unix_connection.UnixConnection.receiveFd] to accept the file descriptor.Fluent builder for [gio.unix_connection.UnixConnection]
Methods