wampProtocol = new ServerProtocol(new TopicManager($app)); } /** * {@inheritdoc} */ public function onOpen(ConnectionInterface $conn) { $this->wampProtocol->onOpen($conn); } /** * {@inheritdoc} */ public function onMessage(ConnectionInterface $conn, $msg) { try { $this->wampProtocol->onMessage($conn, $msg); } catch (JsonException $je) { $conn->close(1007); } catch (\UnexpectedValueException $uve) { $conn->close(1007); } } /** * {@inheritdoc} */ public function onClose(ConnectionInterface $conn) { $this->wampProtocol->onClose($conn); } /** * {@inheritdoc} */ public function onError(ConnectionInterface $conn, \Exception $e) { $this->wampProtocol->onError($conn, $e); } /** * {@inheritdoc} */ public function getSubProtocols() { return $this->wampProtocol->getSubProtocols(); } }