On Error
Called when an error occur in a WebSocket connection.
Prototype
void HTTPc_WebSockOnError (HTTPc_CONN_OBJ *p_conn, HTTPc_ERR err);
Arguments
p_conn
Pointer to the current HTTPc Connection Object.
err
HTTPc Error Code causing the connection to close.
Return Values
None.
Required Configuration
- The HTTPc_CFG_WEBSOCKET_EN configuration macro MUST be enabled.
Notes / Warnings
- This hook is set in a HTTPc_WEBSOCK_OBJ using HTTPc_WebSockSetParam() with the parameter HTTPc_PARAM_TYPE_WEBSOCK_ON_ERR.
- Must be set to the HTTPc_WEBSOCK_OBJ before upgrading the connection with HTTPc_WebSockUpgrade().