WebSocketCompleteAction function

The WebSocketCompleteAction function completes an action started by WebSocketGetAction.

Syntax


VOID WINAPI WebSocketCompleteAction(
  _In_  WEB_SOCKET_HANDLE hWebSocket,
  _In_  PVOID pvActionContext,
  _In_  ULONG ulBytesTransferred
);

Parameters

hWebSocket [in]

Type: WEB_SOCKET_HANDLE

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

pvActionContext [in]

Type: PVOID

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

ulBytesTransferred [in]

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

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Websocket.h

Library

Websocket.lib

DLL

Websocket.dll

See also

WEB_SOCKET_ACTION
WebSocketGetAction

 

 

Community Additions

ADD
Show:
© 2014 Microsoft