Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: InputMessage

[24:7] extends: object

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.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • InputMessage (Handle = null)

    Creates a new InputMessage by wrapping a native handle or another wrapper.

    • @p Handle is the native handle or another wrapper whose handle to adopt.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.