Method

GioDatagramBasedcondition_wait

Declaration

gboolean
g_datagram_based_condition_wait (
  GDatagramBased* datagram_based,
  GIOCondition condition,
  gint64 timeout,
  GCancellable* cancellable,
  GError** error
)

Description

Waits for up to timeout microseconds for condition to become true on datagram_based. If the condition is met, TRUE is returned.

If cancellable is cancelled before the condition is met, or if timeout is reached before the condition is met, then FALSE is returned and error is set appropriately (G_IO_ERROR_CANCELLED or G_IO_ERROR_TIMED_OUT).

Available since:2.48

Parameters

condition

Type: GIOCondition

A GIOCondition mask to wait for.

timeout

Type: gint64

The maximum time (in microseconds) to wait, 0 to not block, or -1 to block indefinitely.

cancellable

Type: GCancellable

A GCancellable.

The argument can be NULL.
The data is owned by the caller of the function.
error

Type: GError **

The return location for an error.

The argument can be NULL.
The argument will be set to NULL by the function if there are no errors.
In case of error, the argument will be set and the caller will take ownership of the data, and be responsible for freeing it.

Return value

Type: gboolean

TRUE if the condition was met, FALSE otherwise.