InputMessage

class InputMessage(pointer: <Error class: unknown class><<Error class: unknown class>>, cleaner: <Error class: unknown class>? = null)

Structure used for scatter/gather data input when receiving multiple messages or packets in one go. You generally pass in an array of empty #GInputVectors and the operation will use all the buffers as if they were one buffer, and will set @bytes_received to the total number of bytes received across all #GInputVectors.

This structure closely mirrors struct mmsghdr and struct msghdr from the POSIX sockets API (see man 2 recvmmsg).

If @address is non-null then it is set to the source address the message was received from, and the caller must free it afterwards.

If @control_messages is non-null then it is set to an array of control messages received with the message (if any), and the caller must free it afterwards. @num_control_messages is set to the number of elements in this array, which may be zero.

Flags relevant to this message will be returned in @flags. For example, MSG_EOR or MSG_TRUNC.

Skipped during bindings generation

  • field vectors: InputVector

  • field control_messages: Array parameter of type SocketControlMessage is not supported

  • field num_control_messages: Unsupported pointer to primitive type

Since

2.48

Constructors

Link copied to clipboard
constructor()

Allocate a new InputMessage.

constructor(scope: <Error class: unknown class>)

Allocate a new InputMessage using the provided AutofreeScope.

constructor(address: SocketAddress?, numVectors: <Error class: unknown class>, bytesReceived: <Error class: unknown class>, flags: <Error class: unknown class>)

Allocate a new InputMessage.

constructor(address: SocketAddress?, numVectors: <Error class: unknown class>, bytesReceived: <Error class: unknown class>, flags: <Error class: unknown class>, scope: <Error class: unknown class>)

Allocate a new InputMessage using the provided AutofreeScope.

constructor(pointer: <Error class: unknown class><<Error class: unknown class>>, cleaner: <Error class: unknown class>? = null)

Properties

Link copied to clipboard

return location for a #GSocketAddress, or null

Link copied to clipboard
var bytesReceived: <Error class: unknown class>

will be set to the number of bytes that have been received

Link copied to clipboard
var flags: <Error class: unknown class>

collection of #GSocketMsgFlags for the received message, outputted by the call

Link copied to clipboard
val gioInputMessagePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
var numVectors: <Error class: unknown class>

the number of input vectors pointed to by @vectors

Functions

Link copied to clipboard
open override fun toString(): String