Evd.BufferedInputStream¶
- Subclasses:
None
Methods¶
- Inherited:
Gio.BufferedInputStream (11), Gio.FilterInputStream (3), Gio.InputStream (19), GObject.Object (37), Gio.Seekable (5)
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Evd.BufferedInputStream(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(base_stream)¶
- Parameters:
base_stream (
Gio.InputStream
) –- Return type:
- freeze()¶
- read_str(count, io_priority, cancellable, callback, *user_data)¶
- Parameters:
count (
int
) –io_priority (
int
) –cancellable (
Gio.Cancellable
orNone
) –callback (
Gio.AsyncReadyCallback
orNone
) – theGio.AsyncReadyCallback
- read_str_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) –- Raises:
- Return type:
- unread(buffer, size, cancellable)¶
- Parameters:
buffer (
object
orNone
) – Buffer holding the data to be unread. Can contain nulls.size (
int
) – Number of bytes to unread.cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
object, orNone
.
- Raises:
- Returns:
The actual number of bytes unread.
- Return type:
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).