Class OutputMessage

java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gio.OutputMessage
All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class OutputMessage extends ProxyInstance

Structure used for scatter/gather data output when sending multiple messages or packets in one go. You generally pass in an array of GOutputVectors and the operation will use all the buffers as if they were one buffer.

If address is null then the message is sent to the default receiver (as previously set by g_socket_connect()).

Since:
2.44
  • Constructor Details

    • OutputMessage

      public OutputMessage(MemorySegment address)
      Create a OutputMessage proxy instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • OutputMessage

      public OutputMessage(Arena arena)
      Allocate a new OutputMessage.
      Parameters:
      arena - to control the memory allocation scope
    • OutputMessage

      public OutputMessage()
      Allocate a new OutputMessage. The memory is allocated with Arena.ofAuto().
    • OutputMessage

      public OutputMessage(SocketAddress address, OutputVector vectors, int numVectors, int bytesSent, SocketControlMessage[] controlMessages, int numControlMessages, Arena arena)
      Allocate a new OutputMessage with the fields set to the provided values.
      Parameters:
      address - value for the field address
      vectors - value for the field vectors
      numVectors - value for the field numVectors
      bytesSent - value for the field bytesSent
      controlMessages - value for the field controlMessages
      numControlMessages - value for the field numControlMessages
      arena - to control the memory allocation scope
    • OutputMessage

      public OutputMessage(SocketAddress address, OutputVector vectors, int numVectors, int bytesSent, SocketControlMessage[] controlMessages, int numControlMessages)
      Allocate a new OutputMessage with the fields set to the provided values. The memory is allocated with Arena.ofAuto().
      Parameters:
      address - value for the field address
      vectors - value for the field vectors
      numVectors - value for the field numVectors
      bytesSent - value for the field bytesSent
      controlMessages - value for the field controlMessages
      numControlMessages - value for the field numControlMessages
  • Method Details

    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • readAddress

      public SocketAddress readAddress()
      Read the value of the field address.
      Returns:
      The value of the field address
    • writeAddress

      public void writeAddress(SocketAddress address)
      Write a value in the field address.
      Parameters:
      address - The new value for the field address
    • readVectors

      public OutputVector readVectors()
      Read the value of the field vectors.
      Returns:
      The value of the field vectors
    • writeVectors

      public void writeVectors(OutputVector vectors)
      Write a value in the field vectors.
      Parameters:
      vectors - The new value for the field vectors
    • readNumVectors

      public int readNumVectors()
      Read the value of the field num_vectors.
      Returns:
      The value of the field num_vectors
    • writeNumVectors

      public void writeNumVectors(int numVectors)
      Write a value in the field num_vectors.
      Parameters:
      numVectors - The new value for the field num_vectors
    • readBytesSent

      public int readBytesSent()
      Read the value of the field bytes_sent.
      Returns:
      The value of the field bytes_sent
    • writeBytesSent

      public void writeBytesSent(int bytesSent)
      Write a value in the field bytes_sent.
      Parameters:
      bytesSent - The new value for the field bytes_sent
    • readControlMessages

      public @Nullable SocketControlMessage @Nullable [] readControlMessages()
      Read the value of the field control_messages.
      Returns:
      The value of the field control_messages
    • writeControlMessages

      public void writeControlMessages(@Nullable SocketControlMessage @Nullable [] controlMessages, Arena _arena)
      Write a value in the field control_messages.
      Parameters:
      controlMessages - The new value for the field control_messages
      _arena - to control the memory allocation scope
    • readNumControlMessages

      public int readNumControlMessages()
      Read the value of the field num_control_messages.
      Returns:
      The value of the field num_control_messages
    • writeNumControlMessages

      public void writeNumControlMessages(int numControlMessages)
      Write a value in the field num_control_messages.
      Parameters:
      numControlMessages - The new value for the field num_control_messages