Skip to content

2.0.0 RC3

Pre-release
Pre-release
Compare
Choose a tag to compare
@trowski trowski released this 22 Apr 18:28
353b96b
  • Split ClientHandler into two interfaces, adding WebsocketObserver for the onStart() and onStop() methods.
  • Added Websocket::attach(WebsocketObserver $observer) method for attaching additional observers. Note that the ClientHandler given to the Websocket constructor is automatically attached, attach() does not need to be called separately.
  • Added Endpoint interface. ClientHandler::handleHandshake() and ClientHandler::handleClient() is now given an instance of Endpoint as the first argument. This object is used to broadcast, retrieve connected clients, etc.