PollableInputStreamT.createSource

Creates a glib.Source 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.

As with g_pollable_input_stream_is_readable(), it is possible that the stream may not actually be readable even after the source triggers, so you should use g_pollable_input_stream_read_nonblocking() rather than InputStream.read from the callback.

template PollableInputStreamT(TStruct)
createSource

Parameters

cancellable Cancellable

a gio.Cancellable, or NULL

Return Value

Type: Source

Meta

Since

2.28