Websocket
Table of Contents
Classes
- Bridge
- Turns a WebSocket frame into a REST call: one message is one
`new Restresponse($module, $action, $data, true)`, answered with the same
envelope as `api/index.php`.
- Connection
- One connected client: its socket, its read buffer, its write queue and what
the handshake told us about it.
- Frame
- RFC 6455 frame codec: the byte layer, with no socket and no state.
- Handshake
- The opening handshake: reads the HTTP request of a new connection and turns
a correct one into the 101 response.
- Hub
- The event side of the service: who listens to what, and how a PHP script makes
something happen for them.
- Protocol_exception
- A WebSocket protocol error, carrying the close code the peer must receive.
- Router
- Chooses the handler of a connection from the path of its handshake.
- Server
- The WebSocket server: one stream, one loop, the connections it accepts.
Traits
- Logs
- The log line of every component of the service, in one place.