:right-sidebar: True UnixInputStream =================================================================== .. currentmodule:: gi.repository.Gio .. class:: UnixInputStream(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gio.InputStream`, :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gio.FileDescriptorBased`, :class:`~gi.repository.Gio.PollableInputStream` ``GUnixInputStream`` implements :obj:`~gi.repository.Gio.InputStream` for reading from a UNIX file descriptor, including asynchronous operations. (If the file descriptor refers to a socket or pipe, this will use ``poll()`` to do asynchronous I/O. If it refers to a regular file, it will fall back to doing asynchronous I/O in another thread.) 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:: UnixInputStream :no-index: .. classmethod:: new(fd: int, close_fd: bool) -> ~gi.repository.Gio.InputStream Creates a new :obj:`~gi.repository.Gio.UnixInputStream` for the given ``fd``\. If ``close_fd`` is :const:`True`, the file descriptor will be closed when the stream is closed. :param fd: a UNIX file descriptor :param close_fd: :const:`True` to close the file descriptor when done Methods ------- .. rst-class:: interim-class .. class:: UnixInputStream :no-index: .. method:: get_close_fd() -> bool Returns whether the file descriptor of ``stream`` will be closed when the stream is closed. .. versionadded:: 2.20 .. method:: get_fd() -> int Return the UNIX file descriptor that the stream reads from. .. versionadded:: 2.20 .. method:: set_close_fd(close_fd: bool) -> None Sets whether the file descriptor of ``stream`` shall be closed when the stream is closed. .. versionadded:: 2.20 :param close_fd: :const:`True` to close the file descriptor when done Properties ---------- .. rst-class:: interim-class .. class:: UnixInputStream :no-index: .. attribute:: props.close_fd :type: bool The type of the None singleton. .. versionadded:: 2.20 .. attribute:: props.fd :type: int The type of the None singleton. .. versionadded:: 2.20 Fields ------ .. rst-class:: interim-class .. class:: UnixInputStream :no-index: .. attribute:: parent_instance .. attribute:: priv