struct TransportWaiter
Defined at line 151 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/internal/transport.h
Generic interface for waiting on a transport (for new messages, peer close, etc).
This is created by |create_waiter| in |TransportVTable|.
Public Methods
zx_status_t Begin ()
Begin waiting. Invokes the success or failure handler when the wait completes.
Exactly one of the wait's handlers will be invoked exactly once per Begin() call
unless the wait is canceled. When the dispatcher is shutting down (being destroyed),
the handlers of all remaining waits will be invoked with a status of |ZX_ERR_CANCELED|.
Returns |ZX_OK| if the wait was successfully begun.
Returns |ZX_ERR_ACCESS_DENIED| if the object does not have |ZX_RIGHT_WAIT|.
Returns |ZX_ERR_BAD_STATE| if the dispatcher is shutting down.
Returns |ZX_ERR_NOT_SUPPORTED| if not supported by the dispatcher.
This operation is thread-safe.
CancellationResult Cancel ()
Cancels any wait started on the waiter.
If successful, the wait's handler will not run.
See |CancellationResult| for meanings of the return values.
This operation is thread-safe.
void ~TransportWaiter ()
Defined at line 196 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/internal/transport.h
Enumerations
enum CancellationResult
| Name | Value |
|---|---|
| kOk | 0 |
| kNotFound | 1 |
| kDispatcherContextNeeded | 2 |
| kNotSupported | 3 |
Defined at line 166 of file ../../sdk/lib/fidl/cpp/wire/include/lib/fidl/cpp/wire/internal/transport.h