gio.pollable_input_stream
Module for PollableInputStream interface
Types 2
interfacePollableInputStream
gio.pollable_input_stream.PollableInputStream is implemented by gio.input_stream.InputStreams that can be polled for readiness to read. This can be used when interfacing with a non-GIO API that expects UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.
Some classes may implement gio.pollable_input_stream.PollableInputStream but have only certain instances of that class be pollable. If gio.pollable_input_stream.PollableInputStream.canPoll returns false, then the behavior of other gio.pollable_input_stream.PollableInputStream methods is undefined.
Methods
bool canPoll()Checks if stream is actually pollable. Some classes may implement #GPollableInputStream but have only certain instances of that class be pollable. If this method returns false, then the behavior of...glib.source.Source createSource(gio.cancellable.Cancellable cancellable = null)Creates a #GSource that triggers when stream can be read, or cancellable is triggered or an error occurs. The callback on the source is of the #GPollableSourceFunc type.bool isReadable()Checks if stream can be read.ptrdiff_t readNonblocking(ref ubyte[] buffer, gio.cancellable.Cancellable cancellable = null)Attempts to read up to count bytes from stream into buffer, as with [gio.input_stream.InputStream.read]. If stream is not currently readable, this will immediately return [gio.types.IOErrorEnum.Wou...interfacePollableInputStreamGidBuilderImpl(T)
Fluent builder implementation template for gio.pollable_input_stream.PollableInputStream