SocketControlMessage

open class SocketControlMessage(pointer: <Error class: unknown class><<Error class: unknown class>>)

A GSocketControlMessage is a special-purpose utility message that can be sent to or received from a class@Gio.Socket. These types of messages are often called ‘ancillary data’.

The message can represent some sort of special instruction to or information from the socket or can represent a special kind of transfer to the peer (for example, sending a file descriptor over a UNIX socket).

These messages are sent with method@Gio.Socket.send_message and received with method@Gio.Socket.receive_message.

To extend the set of control message that can be sent, subclass this class and override the get_size, get_level, get_type and serialize methods.

To extend the set of control messages that can be received, subclass this class and implement the deserialize method. Also, make sure your class is registered with the type@GObject.Type type system before calling method@Gio.Socket.receive_message to read such a message.

Skipped during bindings generation

  • parameter data: gpointer

  • parameter data: Array parameter of type guint8 is not supported

Since

2.22

Inheritors

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val gioSocketControlMessagePointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
open fun getLevel(): Int

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

Link copied to clipboard
open fun getMsgType(): Int

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

Link copied to clipboard
open fun getSize(): <Error class: unknown class>

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