Class: Gio::SimpleIOStream

Inherits:
IOStream show all
Defined in:
(unknown)

Overview

GSimpleIOStream creates a [classGio.IOStream] from an arbitrary [classGio.InputStream] and [classGio.OutputStream]. This allows any pair of input and output streams to be used with [classGio.IOStream] methods.

This is useful when you obtained a [classGio.InputStream] and a [classGio.OutputStream] by other means, for instance creating them with platform specific methods as g_unix_input_stream_new() (from gio-unix-2.0.pc / GioUnix-2.0), and you want to take advantage of the methods provided by [classGio.IOStream].

Instance Method Summary collapse

Methods inherited from IOStream

#clear_pending, #close, #close_async, #close_finish, #closed=, #closed?, #has_pending, #is_closed, #set_pending, #splice_async, splice_finish

Constructor Details

#initialize(input_stream, output_stream) ⇒ Gio::IOStream

Creates a new GSimple::IOStream wrapping input_stream and output_stream. See also #GIOStream.

Parameters:

Instance Method Details

#input_streamGio::InputStream

The [classGio.InputStream] to read from.

Returns:

#input_stream=(input_stream) ⇒ Gio::InputStream

The [classGio.InputStream] to read from.

Parameters:

Returns:

#output_streamGio::OutputStream

The [classGio.OutputStream] to write to.

Returns:

#output_stream=(output_stream) ⇒ Gio::OutputStream

The [classGio.OutputStream] to write to.

Parameters:

Returns: