Method Protocols.WebSocket.Request()->websocket_accept()


Method websocket_accept

Connection websocket_accept(void|string protocol, void|array(extension_factory) extensions, void|mapping extra_headers)

Description

Calling websocket_accept completes the WebSocket connection handshake. The protocol parameter should be either 0 or one of the protocols advertised by the client when initiating the WebSocket connection. Extensions can be specified using the extensions parameter. Additional HTTP headers in the response can be specified using the extra_headers argument.

The returned connection object is in state Connection.OPEN.