nabto_client_future_set_callback2()

DESCRIPTION

Set a callback to be called when the future resolves

It is not allowed to call the following functions from the callback as they could either creash the application or lead to the callback thread being blocked.

  • nabto_client_future_wait
  • nabto_client_future_timed_wait
  • nabto_client_stop
  • nabto_client_free

DECLARATION

NABTO_CLIENT_DECL_PREFIX NabtoClientError NABTO_CLIENT_API
nabto_client_future_set_callback2(NabtoClientFuture* future,
    NabtoClientFutureCallback callback,
    void* data)

PARAMETERS

future:
[in] The future.
callback:
[in] The callback.
data:
[in] User data for the callback.

RETURNS

NABTO_CLIENT_EC_OK if the callback is set