2.0.0 RC3
Pre-release
Pre-release
- Split
ClientHandler
into two interfaces, addingWebsocketObserver
for theonStart()
andonStop()
methods. - Added
Websocket::attach(WebsocketObserver $observer)
method for attaching additional observers. Note that theClientHandler
given to theWebsocket
constructor is automatically attached,attach()
does not need to be called separately. - Added
Endpoint
interface.ClientHandler::handleHandshake()
andClientHandler::handleClient()
is now given an instance ofEndpoint
as the first argument. This object is used to broadcast, retrieve connected clients, etc.