
Last chance! 50% off unlimited learning
Sale ends in
GSource
that can be attached to a GMainContext
to monitor
for the availibility of the specified condition
on the socket.gSocketCreateSource(object, condition, cancellable = NULL)
object
GSocket
condition
GIOCondition
mask to monitorcancellable
GCancellable
or NULL
GSource
, free with gSourceUnref()
.GSocketSourceFunc
type.
It is meaningless to specify G_IO_ERR
or G_IO_HUP
in condition;
these conditions will always be reported output if they are true.
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
gCancellableIsCancelled
.
Since 2.22