Evd.BufferedInputStream

g Evd.BufferedInputStream Evd.BufferedInputStream GObject.GInterface GObject.GInterface Gio.Seekable Gio.Seekable GObject.GInterface->Gio.Seekable GObject.Object GObject.Object Gio.InputStream Gio.InputStream GObject.Object->Gio.InputStream Gio.BufferedInputStream Gio.BufferedInputStream Gio.BufferedInputStream->Evd.BufferedInputStream Gio.FilterInputStream Gio.FilterInputStream Gio.FilterInputStream->Gio.BufferedInputStream Gio.InputStream->Gio.FilterInputStream Gio.Seekable->Gio.BufferedInputStream

Subclasses:

None

Methods

Inherited:

Gio.BufferedInputStream (11), Gio.FilterInputStream (3), Gio.InputStream (19), GObject.Object (37), Gio.Seekable (5)

Structs:

GObject.ObjectClass (5)

class

new (base_stream)

freeze ()

read_str (count, io_priority, cancellable, callback, *user_data)

read_str_finish (result)

read_str_sync (size)

thaw (priority)

unread (buffer, size, cancellable)

Virtual Methods

Inherited:

Gio.BufferedInputStream (3), Gio.InputStream (9), GObject.Object (7), Gio.Seekable (5)

Properties

Inherited:

Gio.BufferedInputStream (1), Gio.FilterInputStream (2)

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

Gio.BufferedInputStream

r

Class Details

class Evd.BufferedInputStream(**kwargs)
Bases:

Gio.BufferedInputStream

Abstract:

No

Structure:

Evd.BufferedInputStreamClass

classmethod new(base_stream)
Parameters:

base_stream (Gio.InputStream) –

Return type:

Evd.BufferedInputStream

freeze()
read_str(count, io_priority, cancellable, callback, *user_data)
Parameters:
read_str_finish(result)
Parameters:

result (Gio.AsyncResult) –

Raises:

GLib.Error

Return type:

(str, size: int)

read_str_sync(size)
Parameters:

size (int) –

Raises:

GLib.Error

Return type:

(str, size: int)

thaw(priority)
Parameters:

priority (int) –

unread(buffer, size, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

The actual number of bytes unread.

Return type:

int

Stores size bytes from buffer in the local read buffer of the socket. Next calls to read will first get data from the local buffer, before performing the actual read operation. This is useful when one needs to do some action with a data just read, but doesn’t want to remove the data from the input stream of the socket.

Normally, it would be used to write back data that was previously read, to made it available in further calls to read. But in practice any data can be unread.

This feature was implemented basically to provide type-of-stream detection on a socket (e.g. a service selector).