WebSocketCreateClientHandle function (websocket.h)

The WebSocketCreateClientHandle function creates a client-side WebSocket session handle.

Syntax

HRESULT WebSocketCreateClientHandle(
  [in]  const PWEB_SOCKET_PROPERTY pProperties,
  [in]  ULONG                      ulPropertyCount,
  [out] WEB_SOCKET_HANDLE          *phWebSocket
);

Parameters

[in] pProperties

Type: const PWEB_SOCKET_PROPERTY

Pointer to an array of WEB_SOCKET_PROPERTY structures that contain WebSocket session-related properties.

[in] ulPropertyCount

Type: ULONG

Number of properties in pProperties.

[out] phWebSocket

Type: WEB_SOCKET_HANDLE*

On successful output, pointer to a newly allocated client-side WebSocket session handle.

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.

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_PROPERTY

WebSocketAbortHandle

WebSocketCreateServerHandle

WebSocketDeleteHandle