Function anj_send_abort

Function Documentation

int anj_send_abort(anj_t *anj, uint16_t send_id)

Abort a queued or in-flight Send request.

  • If the request is queued, it is removed from the queue.

  • If the request is in progress, the exchange is cancelled.

In both cases, ANJ_SEND_ERR_ABORT is reported to the completion handler.

Parameters:
  • anj – Anjay object.

  • send_id – ID of the Send request to abort. Use ANJ_SEND_ID_ALL to abort all pending requests.

Returns:

0 on success; ANJ_SEND_ERR_NO_REQUEST_FOUND if no matching request exists; ANJ_SEND_ERR_ABORT if abort is already in progress.