create_source


Description:

public abstract PollableSource create_source (Cancellable? cancellable = null)

Creates a SocketSource that triggers when this can be written, or cancellable is triggered or an error occurs.

The callback on the source is of the PollableSourceFunc type.

As with is_writable, it is possible that the stream may not actually be writable even after the source triggers, so you should use write_nonblocking rather than write from the callback.

Parameters:

this

a PollableOutputStream.

cancellable

a Cancellable, or null

Returns:

a new SocketSource




2022 vala-language.org