manpagez: man pages & more
html files: pygobject
Home | html | info | man
): gio.unix.InputStream(fd, close_fd)
def get_close_fd()
def get_fd()
def set_close_fd(close_fd)

Ancestry

+-- gobject.GObject
  +-- gio.InputStream
    +-- gio.unix.InputStream

gio.unix.InputStream Properties

"close-fd"Read - WriteWhether to close the file descriptor when the stream is closed. Default value: True.
"fd"Read - Write - Construct onlyThe file descriptor that the stream reads from. Default value: -1.

Description

gio.unix.InputStream implements gio.InputStream for reading from a UNIX file descriptor, including asynchronous operations. The file descriptor must be selectable, so it doesn't work with opened files.

Note that gio.unix.InputStream belongs to the UNIX-specific GIO interfaces, thus you have to use the gio-unix-2.0.pc pkg-config file when using it.

Constructor

    gio.unix.InputStream(fd, close_fd)

fd :

a UNIX file descriptor.

close_fd :

True to close the file descriptor when done

Returns :

a new gio.unix.InputStream

Creates a new gio.unix.InputStream from the given fd.

If close_fd is True, the file descriptor will be closed when the stream is closed.

Methods

gio.unix.InputStream.get_close_fd

    def get_close_fd()

Returns :

True if the file descriptor is closed when done.

The get_close_fd() method returns whether the file descriptor of stream will be closed when the stream is closed.

gio.unix.InputStream.get_fd

    def get_fd()

Returns :

The file descriptor of stream.

The get_fd() method return the UNIX file descriptor that the stream reads from.

gio.unix.InputStream.set_close_fd

    def set_close_fd(close_fd)

close_fd :

True to close the file descriptor when done .

The set_close_fd() method sets whether the file descriptor of stream shall be closed when the stream is closed.

© manpagez.com 2000-2017
Individual documents may contain additional copyright information.