create_source


Description:

public Source create_source (Cancellable? cancellable = null) throws Error

Create a SocketSource for this.

The new source will have a default SocketSourceFunc of io_func.

cancellable if not null can be used to cancel the source, which will cause the source to trigger, reporting the current condition (which is likely 0 unless cancellation happened at the same time as a condition change). You can check for this in the callback using is_cancelled.

This takes a reference on this until source is destroyed.

Parameters:

this

a Server

cancellable

a Cancellable or null.

Returns:

the SocketSource for this or null when an error occurred. Free with g_source_unref ()




2022 vala-language.org