Register a callback notified when an engine completes an async operation.
Declared in <openssl/async.h>
int
ASYNC_WAIT_CTX_set_callback(
ASYNC_WAIT_CTX* ctx,
ASYNC_callback_fn callback,
void* callback_arg);
Prefer this when a wait file descriptor is too costly or unavailable. Pair with ASYNC_WAIT_CTX_set_status() so the engine can report ASYNC_STATUS_* progress.
1 on success, or 0 on error.
| Name | Description |
|---|---|
| ctx | Wait context that stores the callback. |
| callback | Function invoked from a poll or interrupt context; must be small and nonblocking. |
| callback_arg | User argument passed to callback. |