Skip to content

Latest commit

 

History

History
183 lines (124 loc) · 7.7 KB

nf-websocket-websocketgetaction.md

File metadata and controls

183 lines (124 loc) · 7.7 KB
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.
WebSocketGetAction
WebSocketGetAction function [Websocket Protocol Component API]
websock.websocketgetaction
websocket/WebSocketGetAction
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
WebSocketGetAction
websocket/WebSocketGetAction
c++
APIRef
kbSyntax
DllExport
websocket.dll
WebSocketGetAction

WebSocketGetAction function

-description

The WebSocketGetAction function returns an action from a call to WebSocketSend, WebSocketReceive or WebSocketCompleteAction.

-parameters

-param hWebSocket [in]

Type: WEB_SOCKET_HANDLE

WebSocket session handle returned by a previous call to WebSocketCreateClientHandle or WebSocketCreateServerHandle.

-param eActionQueue [in]

Type: WEB_SOCKET_ACTION_QUEUE

Enumeration that specifies whether to query the send queue, the receive queue, or both.

-param pDataBuffers [in, out]

Type: WEB_SOCKET_BUFFER*

Pointer to an array of WEB_SOCKET_BUFFER structures that contain WebSocket buffer data.

Note  Do not allocate or deallocate memory for WEB_SOCKET_BUFFER structures, because they will be overwritten by WebSocketGetAction. The memory for buffers returned by WebSocketGetAction are managed by the library.
 

-param pulDataBufferCount [in, out]

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.

-param pAction [out]

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.

-param pBufferType [out]

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.

-param pvApplicationContext [out, optional]

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.

-param pvActionContext [out]

Type: PVOID*

On successful output, pointer to an action context handle. This handle is passed into a subsequent call WebSocketCompleteAction.

-returns

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
E_INVALID_PROTOCOL_FORMAT
Protocol data had invalid format. This is only returned for receive operations.
E_INVALID_PROTOCOL_OPERATION
Protocol performed invalid operations. This is only returned for receive operations.

-remarks

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:

There may be only one outstanding send and receive operation at a time, so the next action will be returned once the previous one has been completed using WebSocketCompleteAction.

-see-also

WEB_SOCKET_ACTION

WEB_SOCKET_ACTION_QUEUE

WEB_SOCKET_BUFFER_TYPE

WebSocketCompleteAction

WebSocketReceive

WebSocketSend