Back to Seed Clases

Gio


Classes

Interfaces

Structs

Unions

Enums

GObject.Object
parent-child marker Gio.IOStream

Class Gio.IOStream

Import line: Gio = imports.gi.Gio;
GIR File: Gio-2.0.gir
C documentation: GIOStream
Class : IOStream
Subclasses: Gio.FileIOStream
Extends: GObject.Object
GIOStream represents an object that has both read and write streams.
Generally the two streams acts as separate input and output streams,
but they share some common resources and state. For instance, for
seekable streams they may use the same position in both streams.
Examples of GIOStream objects are GSocketConnection which represents
a two-way network connection, and GFileIOStream which represent a
file handle opened in read-write mode.
To do the actual reading and writing you need to get the substreams
with g_io_stream_get_input_stream() and g_io_stream_get_output_stream().
The GIOStream object owns the input and the output streams, not the other
way around, so keeping the substreams alive will not keep the GIOStream
object alive. If the GIOStream object is freed it will be closed, thus
closing the substream, so even if the substreams stay alive they will
always just return a G_IO_ERROR_CLOSED for all operations.
To close a stream use g_io_stream_close() which will close the common
stream object and also the individual substreams. You can also close
the substreams themselves. In most cases this only marks the
substream as closed, so further I/O on it fails. However, some streams
may support "half-closed" states where one direction of the stream
is actually shut down.
Properties
Properties Defined By
Methods / Constructors
Method / Constructor Defined By
Events
None
Used by These Methods / Signals / Properties
Class / Namespace Method / Signal / Properties
Gio
Method
Gio.dbus_address_get_stream_finish (AsyncResult res, String out_guid) : Gio.IOStream
Finishes an operation started with g_dbus_address_get_stream().
Gio
Method
Gio.dbus_address_get_stream_sync (String address, String out_guid, Cancellable cancellable) : Gio.IOStream
Synchronously connects to an endpoint specified by address and
sets up the connection so it is in a state to run the client-side
of the D-Bus authentication conversation.
Gio.DBusAuthObserver
Signal
authorize_authenticated_peer (DBusAuthObserver self, IOStream stream, Credentials credentials) : gboolean
Emitted to check if a peer that is successfully authenticated
is authorized.
Gio.DBusAuthObserver
Method
authorize_authenticated_peer (IOStream stream, Credentials credentials) : gboolean
Emits the GDBusAuthObserver::authorize-authenticated-peer signal on observer.
Gio.DBusConnection
Property
stream : Gio.IOStream
The underlying GIOStream used for I/O.
Gio.DBusConnection
Method
new Gio.DBusConnection.sync (IOStream stream, String guid, DBusConnectionFlags flags, DBusAuthObserver observer, Cancellable cancellable) : Gio.DBusConnection
Create a new Gio.DBusConnection
Gio.DBusConnection
Method
Gio.DBusConnection.c_new (IOStream stream, String guid, DBusConnectionFlags flags, DBusAuthObserver observer, Cancellable cancellable, Function callback, void* user_data) : none
Asynchronously sets up a D-Bus connection for exchanging D-Bus messages
with the end represented by stream.
Gio.DBusConnection
Method
get_stream () : Gio.IOStream
Gets the underlying stream used for IO.
Gio.Proxy
Method
connect (IOStream connection, ProxyAddress proxy_address, Cancellable cancellable) : Gio.IOStream
Given connection to communicate with a proxy (eg, a
GSocketConnection that is connected to the proxy server), this
does the necessary handshake to connect to proxy_address, and if
required, wraps the GIOStream to handle proxy payload.
Gio.Proxy
Method
connect_async (IOStream connection, ProxyAddress proxy_address, Cancellable cancellable, Function callback, void* user_data) : none
Asynchronous version of g_proxy_connect().
Gio.Proxy
Method
connect_finish (AsyncResult result) : Gio.IOStream
See g_proxy_connect().
Gio.TcpWrapperConnection
Property
base_io_stream : Gio.IOStream
Gio.TcpWrapperConnection
Method
new Gio.TcpWrapperConnection.c_new (IOStream base_io_stream, Socket socket) : Gio.SocketConnection
Create a new Gio.TcpWrapperConnection
Gio.TcpWrapperConnection
Method
get_base_io_stream () : Gio.IOStream
Get's conn's base GIOStream
Gio.TlsConnection
Property
base_io_stream : Gio.IOStream
The GIOStream that the connection wraps
Documentation generated by Introspection Doc Generator Loosely Based on JsDoc Toolkit on Sat Apr 16 2011 17:11:13 GMT+0800 (HKT)