UnixConnection
This is the subclass of class@Gio.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, GUnixConnection
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.
Since
2.22
Constructors
Properties
Functions
Clears the pending flag on @stream.
Closes the stream, releasing resources related to it. This will also close the individual input and output streams, if they are not already closed.
Requests an asynchronous close of the stream, releasing resources related to it. When the operation is finished @callback will be called. You can then call g_io_stream_close_finish() to get the result of the operation.
Closes a stream.
Connect @connection to the specified remote address.
Asynchronously connect @connection to the specified remote address.
Gets the result of a g_socket_connection_connect_async() call.
Gets the input stream for this object. This is used for reading.
Try to get the local address of a socket connection.
Gets the output stream for this object. This is used for writing.
Try to get the remote address of a socket connection.
Checks if a stream has pending actions.
Checks if @connection is connected. This is equivalent to calling g_socket_is_connected() on @connection's underlying #GSocket.
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.
Asynchronously receive credentials.
Finishes an asynchronous receive credentials operation started with g_unix_connection_receive_credentials_async().
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.
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.
Asynchronously send credentials.
Finishes an asynchronous send credentials operation started with g_unix_connection_send_credentials_async().
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.
Sets @stream to have actions pending. If the pending flag is already set or @stream is closed, it will return false and set
Asynchronously splice the output stream of @stream1 to the input stream of