Gio.UnixInputStream - Classes - Gio 2.0 (original) (raw)
g GObject.GInterface GObject.GInterface Gio.FileDescriptorBased Gio.FileDescriptorBased GObject.GInterface->Gio.FileDescriptorBased Gio.PollableInputStream Gio.PollableInputStream GObject.GInterface->Gio.PollableInputStream GObject.Object GObject.Object Gio.InputStream Gio.InputStream GObject.Object->Gio.InputStream Gio.UnixInputStream Gio.UnixInputStream Gio.FileDescriptorBased->Gio.UnixInputStream Gio.InputStream->Gio.UnixInputStream Gio.PollableInputStream->Gio.UnixInputStream
Subclasses:
None
Methods¶
Inherited:
Gio.InputStream (19), GObject.Object (37), Gio.FileDescriptorBased (1), Gio.PollableInputStream (4)
Structs:
class | new (fd, close_fd) |
---|---|
get_close_fd () | |
get_fd () | |
set_close_fd (close_fd) |
Virtual Methods¶
Inherited:
Gio.InputStream (9), GObject.Object (7), Gio.FileDescriptorBased (1), Gio.PollableInputStream (4)
Properties¶
Name | Type | Flags | Short Description |
---|---|---|---|
close-fd | bool | r/w | |
fd | int | r/w/co |
Signals¶
Inherited:
Fields¶
Inherited:
Name | Type | Access | Description |
---|---|---|---|
parent_instance | Gio.InputStream | r |
Class Details¶
class Gio.UnixInputStream(**kwargs)¶
Bases:
Gio.InputStream, Gio.FileDescriptorBased, Gio.PollableInputStream
Abstract:
No
Structure:
GUnixInputStream
implements [class`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 <gio/gunixinputstream.h>
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.
classmethod new(fd, close_fd)[source]¶
Parameters:
Returns:
a new Gio.UnixInputStream
Return type:
Creates a new Gio.UnixInputStream for the given fd.
If close_fd is True, the file descriptor will be closed when the stream is closed.
Returns:
True if the file descriptor is closed when done
Return type:
Returns whether the file descriptor of self will be closed when the stream is closed.
New in version 2.20.
Returns:
The file descriptor of self
Return type:
Return the UNIX file descriptor that the stream reads from.
New in version 2.20.
set_close_fd(close_fd)[source]¶
Parameters:
close_fd (bool) – True to close the file descriptor when done
Sets whether the file descriptor of self shall be closed when the stream is closed.
New in version 2.20.
Property Details¶
Gio.UnixInputStream.props.close_fd¶
Name:
close-fd
Type:
Default Value:
Flags:
Whether to close the file descriptor when the stream is closed.
New in version 2.20.
Gio.UnixInputStream.props.fd¶
Name:
fd
Type:
Default Value:
-1
Flags:
READABLE, WRITABLE, CONSTRUCT_ONLY
The file descriptor that the stream reads from.
New in version 2.20.