WebSocket
class WebSocket implements WebSocketInterface
Properties
| protected Response|null | $connection | ||
| protected array<string, callable> | $events |
Methods
__construct(Response $connection, Request $request, LoggerInterface|null $logger = null)
Create a new WebSocket instance.
void
on(string $event, callable $callback)
Register an event handler.
void
start()
Start the WebSocket message loop.
Details
at line 29
__construct(Response $connection, Request $request, LoggerInterface|null $logger = null)
Create a new WebSocket instance.
at line 41
void
on(string $event, callable $callback)
Register an event handler.
at line 49
void
start()
Start the WebSocket message loop.