Class

GioUnixOutputStream

Description

class Gio.UnixOutputStream : Gio.OutputStream {
  parent_instance: GOutputStream
}

GUnixOutputStream implements GOutputStream 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

g_unix_output_stream_new

Creates a new GUnixOutputStream for the given fd.

Instance methods

g_unix_output_stream_get_close_fd

Returns whether the file descriptor of stream will be closed when the stream is closed.

since: 2.20

g_unix_output_stream_get_fd

Return the UNIX file descriptor that the stream writes to.

since: 2.20

g_unix_output_stream_set_close_fd

Sets whether the file descriptor of stream shall be closed when the stream is closed.

since: 2.20

Methods inherited from GOutputStream (31)

Please see GOutputStream for a full list of methods.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Methods inherited from GFileDescriptorBased (1)
g_file_descriptor_based_get_fd

Gets the underlying file descriptor.

since: 2.24

Methods inherited from GPollableOutputStream (5)
g_pollable_output_stream_can_poll

Checks if stream is actually pollable. Some classes may implement GPollableOutputStream but have only certain instances of that class be pollable. If this method returns FALSE, then the behavior of other GPollableOutputStream methods is undefined.

since: 2.28

g_pollable_output_stream_create_source

Creates a GSource that triggers when stream can be written, or cancellable is triggered or an error occurs. The callback on the source is of the GPollableSourceFunc type.

since: 2.28

g_pollable_output_stream_is_writable

Checks if stream can be written.

since: 2.28

g_pollable_output_stream_write_nonblocking

Attempts to write up to count bytes from buffer to stream, as with g_output_stream_write(). If stream is not currently writable, this will immediately return G_IO_ERROR_WOULD_BLOCK, and you can use g_pollable_output_stream_create_source() to create a GSource that will be triggered when stream is writable.

g_pollable_output_stream_writev_nonblocking

Attempts to write the bytes contained in the n_vectors vectors to stream, as with g_output_stream_writev(). If stream is not currently writable, this will immediately return %G_POLLABLE_RETURN_WOULD_BLOCK, and you can use g_pollable_output_stream_create_source() to create a GSource that will be triggered when stream is writable. error will not be set in that case.

since: 2.60

Properties

Gio.UnixOutputStream:close-fd

Whether to close the file descriptor when the stream is closed.

since: 2.20

Gio.UnixOutputStream:fd

The file descriptor that the stream writes to.

since: 2.20

Signals

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct GioUnixOutputStreamClass {
  GOutputStreamClass parent_class;
  void (* _g_reserved1) (
void
  );
  void (* _g_reserved2) (
void
  );
  void (* _g_reserved3) (
void
  );
  void (* _g_reserved4) (
void
  );
  void (* _g_reserved5) (
void
  );
  
}
No description available.
Class members
parent_class: GOutputStreamClass
No description available.
_g_reserved1: void (* _g_reserved1) ( void )
No description available.
_g_reserved2: void (* _g_reserved2) ( void )
No description available.
_g_reserved3: void (* _g_reserved3) ( void )
No description available.
_g_reserved4: void (* _g_reserved4) ( void )
No description available.
_g_reserved5: void (* _g_reserved5) ( void )
No description available.