Package org.gnome.gio

Class SocketControlMessage

java.lang.Object
All Implemented Interfaces:
Proxy
Direct Known Subclasses:
SocketControlMessage.SocketControlMessageImpl, UnixCredentialsMessage, UnixFDMessage

@Generated("io.github.jwharm.JavaGI") public abstract class SocketControlMessage extends GObject
A GSocketControlMessage is a special-purpose utility message that can be sent to or received from a 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 Socket.sendMessage(org.gnome.gio.SocketAddress, org.gnome.gio.OutputVector[], org.gnome.gio.SocketControlMessage[], int, org.gnome.gio.Cancellable) and received with Socket.receiveMessage(io.github.jwharm.javagi.base.Out<org.gnome.gio.SocketAddress>, org.gnome.gio.InputVector[], io.github.jwharm.javagi.base.Out<org.gnome.gio.SocketControlMessage[]>, io.github.jwharm.javagi.base.Out<java.lang.Integer>, org.gnome.gio.Cancellable).

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 GObject.Type type system before calling Socket.receiveMessage(io.github.jwharm.javagi.base.Out<org.gnome.gio.SocketAddress>, org.gnome.gio.InputVector[], io.github.jwharm.javagi.base.Out<org.gnome.gio.SocketControlMessage[]>, io.github.jwharm.javagi.base.Out<java.lang.Integer>, org.gnome.gio.Cancellable) to read such a message.