Method Protocols.WebSocket.Request()->websocket_accept()
- Method websocket_accept
Connection
websocket_accept(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 either0
or one of the protocols advertised by the client when initiating the WebSocket connection. Extensions can be specified using theextensions
parameter. Additional HTTP headers in the response can be specified using theextra_headers
argument.The returned connection object is in state Connection.OPEN.