GPollableInputStreamInterface

The interface for pollable input streams.

The default implementation of @can_poll always returns true.

The default implementation of @read_nonblocking calls gio.pollable_input_stream.PollableInputStream.isReadable, and then calls gio.input_stream.InputStream.read if it returns true. This means you only need to override it if it is possible that your @is_readable implementation may return true when the stream is not actually readable.

Members

Variables

canPoll
bool function(GPollableInputStream* stream) canPoll;

Checks if the #GPollableInputStream instance is actually pollable

createSource
GSource* function(GPollableInputStream* stream, GCancellable* cancellable) createSource;

Creates a #GSource to poll the stream

gIface
GTypeInterface gIface;

The parent interface.

isReadable
bool function(GPollableInputStream* stream) isReadable;

Checks if the stream is readable

readNonblocking
ptrdiff_t function(GPollableInputStream* stream, void* buffer, size_t count, GError** _err) readNonblocking;

Does a non-blocking read or returns gio.types.IOErrorEnum.WouldBlock