:right-sidebar: True InputMessage =================================================================== .. currentmodule:: gi.repository.Gio .. versionadded:: 2.48 .. class:: InputMessage(*args, **kwargs) :no-contents-entry: Structure used for scatter/gather data input when receiving multiple messages or packets in one go. You generally pass in an array of empty :obj:`~gi.repository.Gio.InputVector` 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 :obj:`~gi.repository.Gio.InputVector`\. This structure closely mirrors ``struct mmsghdr`` and ``struct msghdr`` from the POSIX sockets API (see ``man 2 recvmmsg``\). If ``address`` is non-:const:`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-:const:`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`` or ``MSG_TRUNC``\. Fields ------ .. rst-class:: interim-class .. class:: InputMessage :no-index: .. attribute:: address Return location for a :obj:`~gi.repository.Gio.SocketAddress`\, or :const:`None` .. attribute:: bytes_received Will be set to the number of bytes that have been received .. attribute:: control_messages Return location for a caller-allocated array of :obj:`~gi.repository.Gio.SocketControlMessage`\, or :const:`None` .. attribute:: flags Collection of ``GSocketMsgFlags`` for the received message, outputted by the call .. attribute:: num_control_messages Return location for the number of elements in ``control_messages`` .. attribute:: num_vectors The number of input vectors pointed to by ``vectors`` .. attribute:: vectors Pointer to an array of input vectors