WebSocketCompleteAction function (websocket.h)

The WebSocketCompleteAction function completes an action started by WebSocketGetAction.

Syntax

void WebSocketCompleteAction(
  [in] WEB_SOCKET_HANDLE hWebSocket,
  [in] PVOID             pvActionContext,
  [in] ULONG             ulBytesTransferred
);

Parameters

[in] hWebSocket

Type: WEB_SOCKET_HANDLE

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

[in] pvActionContext

Type: PVOID

Pointer to an action context handle that was returned by a previous call to WebSocketGetAction.

[in] ulBytesTransferred

Type: ULONG

Number of bytes transferred for the WEB_SOCKET_SEND_TO_NETWORK_ACTION or WEB_SOCKET_RECEIVE_FROM_NETWORK_ACTION actions. This value must be 0 for all other actions.

Return value

If the function succeeds, it returns S_OK.

If the function fails, it returns a system error code defined in WinError.h.

Remarks

Each call to WebSocketGetAction must be paired with a call to WebSocketCompleteAction. For the following network actions, I/O errors can occur:

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header websocket.h
Library Websocket.lib
DLL Websocket.dll

See also

WEB_SOCKET_ACTION

WebSocketGetAction