UnixOutputStream
Superclasses: OutputStream
, Object
Implemented Interfaces: FileDescriptorBased
, PollableOutputStream
GUnixOutputStream
implements OutputStream
for writing to 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/gunixoutputstream.h>
belongs to the UNIX-specific GIO
interfaces, thus you have to use the gio-unix-2.0.pc
pkg-config file
file or the GioUnix-2.0
GIR namespace when using it.
Constructors
- class UnixOutputStream
- classmethod new(fd: int, close_fd: bool) OutputStream
Creates a new
UnixOutputStream
for the givenfd
.If
close_fd
, isTrue
, the file descriptor will be closed when the output stream is destroyed.- Parameters:
fd – a UNIX file descriptor
close_fd –
True
to close the file descriptor when done