:right-sidebar: True UnixFDMessage =================================================================== .. currentmodule:: gi.repository.Gio .. class:: UnixFDMessage(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gio.SocketControlMessage`, :class:`~gi.repository.GObject.Object` This :obj:`~gi.repository.Gio.SocketControlMessage` contains a :obj:`~gi.repository.Gio.UnixFDList`\. It may be sent using :obj:`~gi.repository.Gio.Socket.send_message` and received using :obj:`~gi.repository.Gio.Socket.receive_message` over UNIX sockets (ie: sockets in the ``G_SOCKET_FAMILY_UNIX`` family). The file descriptors are copied between processes by the kernel. For an easier way to send and receive file descriptors over stream-oriented UNIX sockets, see :obj:`~gi.repository.Gio.UnixConnection.send_fd` and :obj:`~gi.repository.Gio.UnixConnection.receive_fd`\. Note that ```` belongs to the UNIX-specific GIO interfaces, thus you have to use the ``gio-unix-2.0.pc`` pkg-config file or the ``GioUnix-2.0`` GIR namespace when using it. Constructors ------------ .. rst-class:: interim-class .. class:: UnixFDMessage :no-index: .. classmethod:: new() -> ~gi.repository.Gio.SocketControlMessage Creates a new :obj:`~gi.repository.Gio.UnixFDMessage` containing an empty file descriptor list. .. versionadded:: 2.22 .. classmethod:: new_with_fd_list(fd_list: ~gi.repository.Gio.UnixFDList) -> ~gi.repository.Gio.SocketControlMessage Creates a new :obj:`~gi.repository.Gio.UnixFDMessage` containing ``list``\. .. versionadded:: 2.24 :param fd_list: a :obj:`~gi.repository.Gio.UnixFDList` Methods ------- .. rst-class:: interim-class .. class:: UnixFDMessage :no-index: .. method:: append_fd(fd: int) -> bool Adds a file descriptor to ``message``\. The file descriptor is duplicated using dup(). You keep your copy of the descriptor and the copy contained in ``message`` will be closed when ``message`` is finalized. A possible cause of failure is exceeding the per-process or system-wide file descriptor limit. .. versionadded:: 2.22 :param fd: a valid open file descriptor .. method:: get_fd_list() -> ~gi.repository.Gio.UnixFDList Gets the :obj:`~gi.repository.Gio.UnixFDList` contained in ``message``\. This function does not return a reference to the caller, but the returned list is valid for the lifetime of ``message``\. .. versionadded:: 2.24 Properties ---------- .. rst-class:: interim-class .. class:: UnixFDMessage :no-index: .. attribute:: props.fd_list :type: ~gi.repository.Gio.UnixFDList The type of the None singleton. .. versionadded:: 2.22 Fields ------ .. rst-class:: interim-class .. class:: UnixFDMessage :no-index: .. attribute:: parent_instance .. attribute:: priv