HCSetWebSocketFunctions

Optionally allows the caller to implement the WebSocket functions.

Syntax

HRESULT HCSetWebSocketFunctions(  
         HCWebSocketConnectFunction websocketConnectFunc,  
         HCWebSocketSendMessageFunction websocketSendMessageFunc,  
         HCWebSocketSendBinaryMessageFunction websocketSendBinaryMessageFunc,  
         HCWebSocketDisconnectFunction websocketDisconnectFunc,  
         void* context  
)  

Parameters

websocketConnectFunc   _In_
Type: HCWebSocketConnectFunction

A callback that implements WebSocket connect function as desired. Pass in nullptr to use the default implementation based on the current platform.

websocketSendMessageFunc   _In_
Type: HCWebSocketSendMessageFunction

A callback that implements WebSocket send message function as desired. Pass in nullptr to use the default implementation based on the current platform.

websocketSendBinaryMessageFunc   _In_
Type: HCWebSocketSendBinaryMessageFunction

A callback that implements WebSocket send binary message function as desired. Pass in nullptr to use the default implementation based on the current platform.

websocketDisconnectFunc   _In_
Type: HCWebSocketDisconnectFunction

A callback that implements WebSocket disconnect function as desired. Pass in nullptr to use the default implementation based on the current platform.

context   _In_opt_
Type: void*

The context pointer for the callbacks.

Return value

Type: HRESULT

Result code for this API operation. Possible values are S_OK, or E_FAIL.

Requirements

Header: httpProvider.h

Library: libHttpClient.141.GSDK.C.lib

See also

httpProvider