Register a callback notified when an engine completes an async operation.

Synopsis

Declared in <openssl/async.h>

int
ASYNC_WAIT_CTX_set_callback(
    ASYNC_WAIT_CTX* ctx,
    ASYNC_callback_fn callback,
    void* callback_arg);

Description

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.

Return Value

1 on success, or 0 on error.

Parameters

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.

Created with MrDocs