2.0.0 RC3
Pre-release
Pre-release
- Split
ClientHandlerinto two interfaces, addingWebsocketObserverfor theonStart()andonStop()methods. - Added
Websocket::attach(WebsocketObserver $observer)method for attaching additional observers. Note that theClientHandlergiven to theWebsocketconstructor is automatically attached,attach()does not need to be called separately. - Added
Endpointinterface.ClientHandler::handleHandshake()andClientHandler::handleClient()is now given an instance ofEndpointas the first argument. This object is used to broadcast, retrieve connected clients, etc.