MessageHandler
in package
implements
LoggerAwareInterface, Stringable
uses
StringableTrait
WebSocket\Message\MessageHandler class.
Message/Frame handling.
Table of Contents
Interfaces
- LoggerAwareInterface
- Describes a logger-aware instance.
- Stringable
Constants
- DEFAULT_SIZE = 4096
Properties
- $frameHandler : FrameHandler
- $logger : LoggerInterface
- $readBuffer : array<string|int, mixed>|null
Methods
- __construct() : mixed
- __toString() : string
- pull() : Message
- push() : Message
- setLogger() : void
- Sets a logger instance on the object.
- stringable() : string
Constants
DEFAULT_SIZE
private
mixed
DEFAULT_SIZE
= 4096
Properties
$frameHandler
private
FrameHandler
$frameHandler
$logger
private
LoggerInterface
$logger
$readBuffer
private
array<string|int, mixed>|null
$readBuffer
= null
Methods
__construct()
public
__construct(FrameHandler $frameHandler) : mixed
Parameters
- $frameHandler : FrameHandler
__toString()
public
__toString() : string
Return values
stringpull()
public
pull() : Message
Return values
Messagepush()
public
push(Message $message[, int $size = self::DEFAULT_SIZE ]) : Message
Parameters
- $message : Message
- $size : int = self::DEFAULT_SIZE
Return values
MessagesetLogger()
Sets a logger instance on the object.
public
setLogger(LoggerInterface $logger) : void
Parameters
- $logger : LoggerInterface
stringable()
protected
stringable(string $format, mixed ...$values) : string
Parameters
- $format : string
- $values : mixed