Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets the WebSocket functions to allow callers to respond to incoming messages and WebSocket close events.
Syntax
HRESULT HCWebSocketGetEventFunctions(
HCWebsocketHandle websocket,
HCWebSocketMessageFunction* messageFunc,
HCWebSocketBinaryMessageFunction* binaryMessageFunc,
HCWebSocketCloseEventFunction* closeFunc,
void** functionContext
)
Parameters
websocket _In_
Type: HCWebsocketHandle
The handle of the websocket.
messageFunc _Out_opt_
Type: HCWebSocketMessageFunction*
A pointer to the message handling callback to use, or a null pointer to remove.
binaryMessageFunc _Out_opt_
Type: HCWebSocketBinaryMessageFunction*
A pointer to the binary message handling callback to use, or a null pointer to remove.
closeFunc _Out_opt_
Type: HCWebSocketCloseEventFunction*
A pointer to the close callback to use, or a null pointer to remove.
functionContext _Out_
Type: void**
Client context to pass to callback function.
Return value
Type: HRESULT
Result code for this API operation. Possible values are S_OK, E_INVALIDARG, E_HC_NOT_INITIALISED, or E_FAIL.
Requirements
Header: httpClient.h
Library: libHttpClient.GDK.lib