Class

GioUnixConnection

Description [src]

class Gio.UnixConnection : Gio.SocketConnection {
  parent_instance: GSocketConnection,
  priv: GUnixConnectionPrivate*
}

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.

Available since:2.22

Hierarchy

hierarchy this GUnixConnection ancestor_0 GSocketConnection ancestor_0--this ancestor_1 GIOStream ancestor_1--ancestor_0 ancestor_2 GObject ancestor_2--ancestor_1

Instance methods

g_unix_connection_receive_credentials

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.

Available since: 2.26

g_unix_connection_receive_credentials_async

Asynchronously receive credentials.

Available since: 2.32

g_unix_connection_receive_credentials_finish

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

Available since: 2.32

g_unix_connection_receive_fd

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.

Available since: 2.22

g_unix_connection_send_credentials

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.

Available since: 2.26

g_unix_connection_send_credentials_async

Asynchronously send credentials.

Available since: 2.32

g_unix_connection_send_credentials_finish

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

Available since: 2.32

g_unix_connection_send_fd

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.

Available since: 2.22

Methods inherited from GSocketConnection (7)
g_socket_connection_connect

Connect connection to the specified remote address.

Available since: 2.32

g_socket_connection_connect_async

Asynchronously connect connection to the specified remote address.

Available since: 2.32

g_socket_connection_connect_finish

Gets the result of a g_socket_connection_connect_async() call.

Available since: 2.32

g_socket_connection_get_local_address

Try to get the local address of a socket connection.

Available since: 2.22

g_socket_connection_get_remote_address

Try to get the remote address of a socket connection.

Available since: 2.22

g_socket_connection_get_socket

Gets the underlying GSocket object of the connection. This can be useful if you want to do something unusual on it not supported by the GSocketConnection APIs.

Available since: 2.22

g_socket_connection_is_connected

Checks if connection is connected. This is equivalent to calling g_socket_is_connected() on connections underlying GSocket.

Available since: 2.32

Methods inherited from GIOStream (10)
g_io_stream_clear_pending

Clears the pending flag on stream.

Available since: 2.22

g_io_stream_close

Closes the stream, releasing resources related to it. This will also close the individual input and output streams, if they are not already closed.

Available since: 2.22

g_io_stream_close_async

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.

Available since: 2.22

g_io_stream_close_finish

Closes a stream.

Available since: 2.22

g_io_stream_get_input_stream

Gets the input stream for this object. This is used for reading.

Available since: 2.22

g_io_stream_get_output_stream

Gets the output stream for this object. This is used for writing.

Available since: 2.22

g_io_stream_has_pending

Checks if a stream has pending actions.

Available since: 2.22

g_io_stream_is_closed

Checks if a stream is closed.

Available since: 2.22

g_io_stream_set_pending

Sets stream to have actions pending. If the pending flag is already set or stream is closed, it will return FALSE and set error.

Available since: 2.22

g_io_stream_splice_async

Asynchronously splice the output stream of stream1 to the input stream of stream2, and splice the output stream of stream2 to the input stream of stream1.

Available since: 2.28

Methods inherited from GObject (43)

Properties

Properties inherited from GSocketConnection (1)
Gio.SocketConnection:socket
No description available.
Properties inherited from GIOStream (3)
Gio.IOStream:closed
No description available.
Gio.IOStream:input-stream
No description available.
Gio.IOStream:output-stream
No description available.

Signals

Signals inherited from GObject (1)

Class structure

struct GioUnixConnectionClass {
  GSocketConnectionClass parent_class;
  
}
Class members
parent_class
GSocketConnectionClass
  No description available.