WebSocketEndServerHandshake function (websocket.h)

The WebSocketEndServerHandshake function completes the server-side handshake.

Syntax

HRESULT WebSocketEndServerHandshake(
  [in] WEB_SOCKET_HANDLE hWebSocket
);

Parameters

[in] hWebSocket

Type: WEB_SOCKET_HANDLE

WebSocket session handle returned by a previous call to WebSocketCreateServerHandle.

Return value

Type: HRESULT

If the function succeeds, it returns S_OK.

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

Remarks

This function may be called to complete the server-side handshake after a previous call to WebSocketBeginServerHandshake; however, calling this function is optional and applications may use the session functions without first calling this function. This function frees all internal handshake related structures and allocates data session buffers. All operations handled by this function will be performed internally even if the function is not called.

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

WebSocketBeginClientHandshake

WebSocketBeginServerHandshake

WebSocketEndClientHandshake