...
Like for every hook functions, it's only available when the µC/HTTP-client internal task is active (HTTPc_CFG_MODE_ASYNC_TASK_EN
). This hook is not mandatory when the API function HTTPc_ReqSend()
is called in blocking mode. This hook can be set up with the API function HTTPc_ReqSetParam
and the parameter type HTTPc_PARAM_TYPE_TRANS_ERR_CALLBACK
.
Prototype
Code Block |
---|
void HTTPc_TransErrHook (HTTPc_CONN_OBJ *p_conn_obj,
HTTPc_REQ_OBJ *p_req_obj,
HTTPc_ERR err); |
Arguments
p_conn_obj
Pointer to the current HTTPc Connection Object.
...
Notes / Warnings
None.
Example Template
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
static void HTTPc_TransErrHook (HTTPc_CONN_OBJ *p_conn,
HTTPc_REQ_OBJ *p_req,
HTTPc_ERR err)
{
printf("Transaction error: %i\n\r", err);
} |