DatagramBasedT.createSource

Creates a glib.Source that can be attached to a glib.MainContext to monitor for the availability of the specified condition on the GDatagramBased The glib.Source keeps a reference to the datagram_based.

The callback on the source is of the GDatagramBasedSourceFunc type.

It is meaningless to specify G_IO_ERR or G_IO_HUP in condition; these conditions will always be reported in the callback if they are true.

If non-NULL, cancellable 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 Cancellable.isCancelled.

template DatagramBasedT(TStruct)
createSource

Parameters

condition GIOCondition

a GIOCondition mask to monitor

cancellable Cancellable

Return Value

Type: Source

a newly allocated glib.Source

Meta

Since

2.48