UnixConnection

This is the subclass of GSocketConnection that is created for UNIX domain sockets.

It contains functions to do some of the UNIX socket specific functionality like passing file descriptors.

Note that <gio/gunixconnection.h> belongs to the UNIX-specific GIO interfaces, thus you have to use the gio-unix-2.0.pc pkg-config file when using it.

Constructors

this
this(GUnixConnection* gUnixConnection, bool ownedRef = false)

Sets our main struct and passes it to the parent class.

Members

Functions

getStruct
void* getStruct()

the main Gtk struct as a void*

getUnixConnectionStruct
GUnixConnection* getUnixConnectionStruct(bool transferOwnership = false)

Get the main Gtk struct

receiveCredentials
Credentials receiveCredentials(Cancellable cancellable)

Receives credentials from the sending end of the connection. The sending end has to call g_unix_connection_send_credentials() (or similar) for this to work.

receiveCredentialsAsync
void receiveCredentialsAsync(Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Asynchronously receive credentials.

receiveCredentialsFinish
Credentials receiveCredentialsFinish(AsyncResultIF result)

Finishes an asynchronous receive credentials operation started with g_unix_connection_receive_credentials_async().

receiveFd
int receiveFd(Cancellable cancellable)

Receives a file descriptor from the sending end of the connection. The sending end has to call g_unix_connection_send_fd() for this to work.

sendCredentials
bool sendCredentials(Cancellable cancellable)

Passes the credentials of the current user the receiving side of the connection. The receiving end has to call g_unix_connection_receive_credentials() (or similar) to accept the credentials.

sendCredentialsAsync
void sendCredentialsAsync(Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Asynchronously send credentials.

sendCredentialsFinish
bool sendCredentialsFinish(AsyncResultIF result)

Finishes an asynchronous send credentials operation started with g_unix_connection_send_credentials_async().

sendFd
bool sendFd(int fd, Cancellable cancellable)

Passes a file descriptor to the receiving side of the connection. The receiving end has to call g_unix_connection_receive_fd() to accept the file descriptor.

Static functions

getType
GType getType()

Variables

gUnixConnection
GUnixConnection* gUnixConnection;

the main Gtk struct

Meta

Since

2.22