Hook Functions WebSocket

µC/HTTP-client provides a set of hook functions for WebSocket to customize the stack behavior for your application needs. Those are only available when the µC/HTTP-client internal task is active (HTTPc_CFG_MODE_ASYNC_TASK_EN) and can be set up with the API function HTTPc_WebSockMsgSetParam()


Table - Websocket Hooks
Hook FunctionDescription
Control Hooks
On OpenCalled when a WebSocket Upgrade is successful.
On CloseCalled when a error occurred.
On Error

Called when a connection that has been successfully upgraded close.

Message RX Hooks
On Message Reception InitializationCalled at the beginning of the WebSocket data message reception.
On Message RX DataCalled each time a chunk of the data message is received is available.
On Message RX CompleteCalled when the data message is completely received.
On PongCalled when a Pong message is received.