Class

GioUnixFDMessage

Description [src]

class Gio.UnixFDMessage : Gio.SocketControlMessage {
  parent_instance: GSocketControlMessage,
  priv: GUnixFDMessagePrivate*
}

This GSocketControlMessage contains a GUnixFDList. It may be sent using g_socket_send_message() and received using g_socket_receive_message() over UNIX sockets (ie: sockets in the G_SOCKET_FAMILY_UNIX family). The file descriptors are copied between processes by the kernel.

For an easier way to send and receive file descriptors over stream-oriented UNIX sockets, see g_unix_connection_send_fd() and g_unix_connection_receive_fd().

Note that <gio/gunixfdmessage.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.

Hierarchy

hierarchy this GUnixFDMessage ancestor_0 GSocketControlMessage ancestor_0--this ancestor_1 GObject ancestor_1--ancestor_0

Constructors

g_unix_fd_message_new

Creates a new GUnixFDMessage containing an empty file descriptor list.

Available since: 2.22

g_unix_fd_message_new_with_fd_list

Creates a new GUnixFDMessage containing list.

Available since: 2.24

Instance methods

g_unix_fd_message_append_fd

Adds a file descriptor to message.

Available since: 2.22

g_unix_fd_message_get_fd_list

Gets the GUnixFDList contained in message. This function does not return a reference to the caller, but the returned list is valid for the lifetime of message.

Available since: 2.24

g_unix_fd_message_steal_fds

Returns the array of file descriptors that is contained in this object.

Available since: 2.22

Methods inherited from GSocketControlMessage (4)
g_socket_control_message_get_level

Returns the “level” (i.e. the originating protocol) of the control message. This is often SOL_SOCKET.

Available since: 2.22

g_socket_control_message_get_msg_type

Returns the protocol specific type of the control message. For instance, for UNIX fd passing this would be SCM_RIGHTS.

Available since: 2.22

g_socket_control_message_get_size

Returns the space required for the control message, not including headers or alignment.

Available since: 2.22

g_socket_control_message_serialize

Converts the data in the message to bytes placed in the message.

Available since: 2.22

Methods inherited from GObject (43)

Properties

Gio.UnixFDMessage:fd-list
No description available.

Signals

Signals inherited from GObject (1)

Class structure

struct GioUnixFDMessageClass {
  GSocketControlMessageClass parent_class;
  void (* _g_reserved1) (
void
  );
  void (* _g_reserved2) (
void
  );
  
}
Class members
parent_class
GSocketControlMessageClass
  No description available.
_g_reserved1
void (* _g_reserved1) (
void
  )
  No description available.
_g_reserved2
void (* _g_reserved2) (
void
  )
  No description available.