WebSocketDeleteHandle function (websocket.h)

The WebSocketDeleteHandle function deletes a WebSocket session handle created by WebSocketCreateClientHandle or WebSocketCreateServerHandle.

Syntax

void WebSocketDeleteHandle(
  [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

Any use of a deleted WEB_SOCKET_HANDLE session handle may result in an access violation.

Before an application deletes a session handle, it must ensure that all operations have been processed. Applications may use WebSocketAbortHandle to abort any queued operations before calling WebSocketDeleteHandle.

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

WebSocketAbortHandle

WebSocketCreateClientHandle

WebSocketCreateServerHandle