Syntax
Parameters
websocketConnectFunc   _In_Type: HCWebSocketConnectFunction A callback that implements the WebSocket connect operation. This callback is required. websocketSendMessageFunc   _In_
Type: HCWebSocketSendMessageFunction A callback that implements sending a text message. This callback is required. websocketSendBinaryMessageFunc   _In_
Type: HCWebSocketSendBinaryMessageFunction A callback that implements sending a binary message. This callback is required. websocketDisconnectFunc   _In_
Type: HCWebSocketDisconnectFunction A callback that implements the WebSocket disconnect operation. This callback is required. context   _In_opt_
Type: void* The context pointer for the callbacks.
Return value
Type: HRESULT ReturnsS_OK on success, E_INVALIDARG if any callback is nullptr, or E_HC_ALREADY_INITIALISED if libHttpClient is already initialized.
Remarks
Call this function before HCInitialize. After libHttpClient is initialized, the function returnsE_HC_ALREADY_INITIALISED.
You must provide all four callbacks. If any callback is nullptr, the function returns E_INVALIDARG. To keep the built-in WebSocket implementation, don’t call this function.
