Package org.gnome.gio
Class OutputMessage
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.gio.OutputMessage
- All Implemented Interfaces:
Proxy
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()).
-
Constructor Summary
ConstructorDescriptionAllocate a new OutputMessage.OutputMessage
(Arena arena) Allocate a new OutputMessage.OutputMessage
(MemorySegment address) Create a OutputMessage proxy instance for the provided memory address.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.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. -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryLayout
The memory layout of the native struct.Read the value of the fieldaddress
.int
Read the value of the fieldbytes_sent
.Read the value of the fieldcontrol_messages
.int
Read the value of the fieldnum_control_messages
.int
Read the value of the fieldnum_vectors
.Read the value of the fieldvectors
.void
writeAddress
(SocketAddress address) Write a value in the fieldaddress
.void
writeBytesSent
(int bytesSent) Write a value in the fieldbytes_sent
.void
writeControlMessages
(SocketControlMessage[] controlMessages, Arena _arena) Write a value in the fieldcontrol_messages
.void
writeNumControlMessages
(int numControlMessages) Write a value in the fieldnum_control_messages
.void
writeNumVectors
(int numVectors) Write a value in the fieldnum_vectors
.void
writeVectors
(OutputVector vectors) Write a value in the fieldvectors
.Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
OutputMessage
Create a OutputMessage proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
OutputMessage
Allocate a new OutputMessage.- Parameters:
arena
- to control the memory allocation scope
-
OutputMessage
public OutputMessage()Allocate a new OutputMessage. The memory is allocated withArena.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 fieldaddress
vectors
- value for the fieldvectors
numVectors
- value for the fieldnumVectors
bytesSent
- value for the fieldbytesSent
controlMessages
- value for the fieldcontrolMessages
numControlMessages
- value for the fieldnumControlMessages
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 withArena.ofAuto()
.- Parameters:
address
- value for the fieldaddress
vectors
- value for the fieldvectors
numVectors
- value for the fieldnumVectors
bytesSent
- value for the fieldbytesSent
controlMessages
- value for the fieldcontrolMessages
numControlMessages
- value for the fieldnumControlMessages
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readAddress
Read the value of the fieldaddress
.- Returns:
- The value of the field
address
-
writeAddress
Write a value in the fieldaddress
.- Parameters:
address
- The new value for the fieldaddress
-
readVectors
Read the value of the fieldvectors
.- Returns:
- The value of the field
vectors
-
writeVectors
Write a value in the fieldvectors
.- Parameters:
vectors
- The new value for the fieldvectors
-
readNumVectors
public int readNumVectors()Read the value of the fieldnum_vectors
.- Returns:
- The value of the field
num_vectors
-
writeNumVectors
public void writeNumVectors(int numVectors) Write a value in the fieldnum_vectors
.- Parameters:
numVectors
- The new value for the fieldnum_vectors
-
readBytesSent
public int readBytesSent()Read the value of the fieldbytes_sent
.- Returns:
- The value of the field
bytes_sent
-
writeBytesSent
public void writeBytesSent(int bytesSent) Write a value in the fieldbytes_sent
.- Parameters:
bytesSent
- The new value for the fieldbytes_sent
-
readControlMessages
Read the value of the fieldcontrol_messages
.- Returns:
- The value of the field
control_messages
-
writeControlMessages
Write a value in the fieldcontrol_messages
.- Parameters:
controlMessages
- The new value for the fieldcontrol_messages
_arena
- to control the memory allocation scope
-
readNumControlMessages
public int readNumControlMessages()Read the value of the fieldnum_control_messages
.- Returns:
- The value of the field
num_control_messages
-
writeNumControlMessages
public void writeNumControlMessages(int numControlMessages) Write a value in the fieldnum_control_messages
.- Parameters:
numControlMessages
- The new value for the fieldnum_control_messages
-