silc_async_init

SYNOPSIS

    SilcBool silc_async_init(SilcAsyncOperation op,
                             SilcAsyncOperationAbort abort_cb,
                             SilcAsyncOperationPause pause_cb,
                             void *context);

DESCRIPTION

Initializes and starts a pre-allocated asynchronous operation context, and assigns `abort_cb' callback for it, which can be used by some upper layer to abort the asynchronous operation, by calling the silc_async_abort. Since this use pre-allocated context, the function silc_async_free need not be called. This function is equivalent to silc_async_alloc except this does not allocate any memory. The `op' needs not be uninitialized. This returns always TRUE.

If the `pause_cb' is provided then the upper layer may also halt and then later resume the execution of the operation, by calling the silc_async_halt and silc_async_resume respectively. If `pause_cb' is not provided then these functions has no effect for this operation.