Gio.InputMessage¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
address |
r/w |
return location for a |
|
bytes_received |
r/w |
will be set to the number of bytes that have been received |
|
control_messages |
r/w |
return location for a caller-allocated array of |
|
flags |
r/w |
collection of |
|
num_control_messages |
r/w |
return location for the number of elements in control_messages |
|
num_vectors |
r/w |
the number of input vectors pointed to by vectors |
|
vectors |
r/w |
pointer to an array of input vectors |
Methods¶
None
Details¶
- class Gio.InputMessage¶
Structure used for scatter/gather data input when receiving multiple messages or packets in one go. You generally pass in an array of empty
Gio.InputVectors
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 allGio.InputVectors
.This structure closely mirrors
struct mmsghdr
andstruct msghdr
from the POSIX sockets API (seeman 2 recvmmsg
).If address is non-
None
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-
None
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
orMSG_TRUNC
.New in version 2.48.