UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:websocket.WebSocketGetAction |
WebSocketGetAction function (websocket.h) |
Returns an action from a call to WebSocketSend, WebSocketReceive or WebSocketCompleteAction. |
|
websock\websocketgetaction.htm |
WebSock |
566cff2d-15dd-45c6-bc41-550be1f45cfd |
12/05/2018 |
WebSocketGetAction, WebSocketGetAction function [Websocket Protocol Component API], websock.websocketgetaction, websocket/WebSocketGetAction |
websocket.h |
Windows |
Windows 8 [desktop apps only] |
Windows Server 2012 [desktop apps only] |
Websocket.lib |
Websocket.dll |
Windows |
19H1 |
|
|
|
|
|
|
The WebSocketGetAction function returns an action from a call to WebSocketSend, WebSocketReceive or WebSocketCompleteAction.
Type: WEB_SOCKET_HANDLE
WebSocket session handle returned by a previous call to WebSocketCreateClientHandle or WebSocketCreateServerHandle.
Type: WEB_SOCKET_ACTION_QUEUE
Enumeration that specifies whether to query the send queue, the receive queue, or both.
Type: WEB_SOCKET_BUFFER*
Pointer to an array of WEB_SOCKET_BUFFER structures that contain WebSocket buffer data.
Type: ULONG*
On input, pointer to a value that specifies the number of elements in pDataBuffers. On successful output, number of elements that were actually returned in pDataBuffers.
Type: WEB_SOCKET_ACTION*
On successful output, pointer to a WEB_SOCKET_ACTION enumeration that specifies the action returned from the query to the queue defines in eActionQueue.
Type: WEB_SOCKET_BUFFER_TYPE*
On successful output, pointer to a WEB_SOCKET_BUFFER_TYPE enumeration that specifies the type of Web Socket buffer data returned in pDataBuffers.
Type: PVOID*
On successful output, pointer to an application context handle. The context returned here was initially passed to WebSocketSend or WebSocketReceive. pvApplicationContext is not set if pAction is WEB_SOCKET_NO_ACTION or WEB_SOCKET_SEND_TO_NETWORK_ACTION when sending a pong in response to receiving a ping.
Type: PVOID*
On successful output, pointer to an action context handle. This handle is passed into a subsequent call WebSocketCompleteAction.
Type: HRESULT
If the function succeeds, it returns S_OK.
If the function fails, it returns one of the following or a system error code defined in WinError.h.
Return code | Description |
---|---|
|
Protocol data had invalid format. This is only returned for receive operations. |
|
Protocol performed invalid operations. This is only returned for receive operations. |
Each call to WebSocketGetAction must be paired with a call to WebSocketCompleteAction.
If the ulBytesTransferred parameter of WebSocketCompleteAction is different than the sum of all buffer lengths for the WEB_SOCKET_SEND_TO_NETWORK_ACTION action or is zero for the WEB_SOCKET_RECEIVE_FROM_NETWORK_ACTION action, the WebSocket application will not send or receive all of the data requested.
WebSocketGetAction will return in pAction:
- WEB_SOCKET_INDICATE_SEND_COMPLETE_ACTION once an operation queued by WebSocketSend is completed.
- WEB_SOCKET_INDICATE_RECEIVE_COMPLETE_ACTION once an operation queued by WebSocketReceive is completed.