HCWebSocketSendMessageAsync

Send message the WebSocket

Syntax

HRESULT HCWebSocketSendMessageAsync(  
         HCWebsocketHandle websocket,  
         const char* message,  
         XAsyncBlock* asyncBlock  
)  

Parameters

websocket   _In_
Type: HCWebsocketHandle

Handle to the WebSocket.

message   _In_z_
Type: char*

The UTF-8 encoded message to send.

asyncBlock   _Inout_
Type: XAsyncBlock*

The XAsyncBlock that defines the async operation.

Return value

Type: HRESULT

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

Remarks

To get the result, first call HCGetWebSocketSendMessageResult inside the AsyncBlock callback or after the AsyncBlock is complete.

Requirements

Header: httpClient.h

Library: libHttpClient.141.GSDK.C.lib

See also

httpClient