WebSocketAbortHandle function (websocket.h)

The WebSocketAbortHandle function aborts a WebSocket session handle created by WebSocketCreateClientHandle or WebSocketCreateServerHandle.

Syntax

void WebSocketAbortHandle(
  [in] WEB_SOCKET_HANDLE hWebSocket
);

Parameters

[in] hWebSocket

Type: WEB_SOCKET_HANDLE

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

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

WebSocketAbortHandle aborts a WEB_SOCKET_HANDLE session handle and any calls to WebSocketSend or WebSocketReceive will return error when called with an aborted handle. WebSocketAbortHandle is a no-op if the WebSocket handshake has not been completed and the session handle has not been initialized. Any send/receive operations that were queued using WebSocketSend or WebSocketReceive will be ready to process using WebSocketGetAction, but attempts to queue additional operations using the aborted handle will result in error.

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

WebSocketCreateClientHandle

WebSocketCreateServerHandle

WebSocketDeleteHandle