NegotiatorInterface
in
A standard interface for interacting with the various version of the WebSocket protocol
Tags
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
GUID
public
mixed
GUID
= '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'
Methods
getVersionNumber()
Although the version has a name associated with it the integer returned is the proper identification
public
getVersionNumber() : int
Return values
inthandshake()
Perform the handshake and return the response headers
public
handshake(RequestInterface $request) : ResponseInterface
Parameters
- $request : RequestInterface
Return values
ResponseInterfaceisProtocol()
Given an HTTP header, determine if this version should handle the protocol
public
isProtocol(RequestInterface $request) : bool
Parameters
- $request : RequestInterface
Return values
boolsetStrictSubProtocolCheck()
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
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>