Documentation

NegotiatorInterface

A standard interface for interacting with the various version of the WebSocket protocol

Tags
todo

Look in to extension support

Table of Contents

Constants

GUID  = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'

Methods

getVersionNumber()  : int
Although the version has a name associated with it the integer returned is the proper identification
handshake()  : ResponseInterface
Perform the handshake and return the response headers
isProtocol()  : bool
Given an HTTP header, determine if this version should handle the protocol
setStrictSubProtocolCheck()  : mixed
If enabled and support for a subprotocol has been added handshake will not upgrade if a match between request and supported subprotocols
setSupportedSubProtocols()  : mixed
Add supported protocols. If the request has any matching the response will include one

Constants

Methods

getVersionNumber()

Although the version has a name associated with it the integer returned is the proper identification

public getVersionNumber() : int
Return values
int

setStrictSubProtocolCheck()

If enabled and support for a subprotocol has been added handshake will not upgrade if a match between request and supported subprotocols

public setStrictSubProtocolCheck(bool $enable) : mixed
Parameters
$enable : bool
Tags
todo

Consider extending this interface and moving this there. The spec does says the server can fail for this reason, but it is not a requirement. This is an implementation detail.

setSupportedSubProtocols()

Add supported protocols. If the request has any matching the response will include one

public setSupportedSubProtocols(array<string|int, mixed> $protocols) : mixed
Parameters
$protocols : array<string|int, mixed>

        
On this page

Search results