Gio.Socket.prototype.condition_wait
function condition_wait(condition: GLib.IOCondition, cancellable: Gio.Cancellable): Boolean { // Gjs wrapper for g_socket_condition_wait() }
Waits for condition to become true on socket. When the condition is met, true is returned.
If cancellable is cancelled before the condition is met, or if the socket has a timeout set and it is reached before the condition is met, then false is returned and @error, if non-null, is set to the appropriate value (Gio.IOErrorEnum.cancelled or Gio.IOErrorEnum.timed_out).
See also Gio.Socket.prototype.condition_timed_wait.
Since 2.22
- condition
a GLib.IOCondition mask to wait for
- cancellable
a Gio.Cancellable, or null
- Returns
true if the condition was met, false otherwise