SubprotocolNegotiation
in package
implements
LoggerAwareInterface, ProcessHttpOutgoingInterface, ProcessHttpIncomingInterface, Stringable
uses
LoggerAwareTrait, StringableTrait
WebSocket\Middleware\CloseHandler class.
Handles close procedure.
Table of Contents
Interfaces
- LoggerAwareInterface
- Describes a logger-aware instance.
- ProcessHttpOutgoingInterface
- WebSocket\Middleware\ProcessHttpOutgoingInterface interface.
- ProcessHttpIncomingInterface
- WebSocket\Middleware\ProcessHttpIncomingInterface interface.
- Stringable
Properties
- $logger : LoggerInterface|null
- The logger instance.
- $require : bool
- $subprotocols : array<string|int, mixed>
Methods
- __construct() : mixed
- __toString() : string
- processHttpIncoming() : Message
- processHttpOutgoing() : Message
- setLogger() : void
- Sets a logger.
- stringable() : string
Properties
$logger
The logger instance.
protected
LoggerInterface|null
$logger
= null
$require
private
bool
$require
$subprotocols
private
array<string|int, mixed>
$subprotocols
Methods
__construct()
public
__construct(array<string|int, mixed> $subprotocols[, bool $require = false ]) : mixed
Parameters
- $subprotocols : array<string|int, mixed>
- $require : bool = false
__toString()
public
__toString() : string
Return values
stringprocessHttpIncoming()
public
processHttpIncoming(ProcessHttpStack $stack, Connection $connection) : Message
Parameters
- $stack : ProcessHttpStack
- $connection : Connection
Return values
MessageprocessHttpOutgoing()
public
processHttpOutgoing(ProcessHttpStack $stack, Connection $connection, Message $message) : Message
Parameters
- $stack : ProcessHttpStack
- $connection : Connection
- $message : Message
Return values
MessagesetLogger()
Sets a logger.
public
setLogger(LoggerInterface $logger) : void
Parameters
- $logger : LoggerInterface
stringable()
protected
stringable(string $format, mixed ...$values) : string
Parameters
- $format : string
- $values : mixed