diff --git a/src/Ratchet/Server/IoServer.php b/src/Ratchet/Server/IoServer.php index b27ee93..587dcd5 100644 --- a/src/Ratchet/Server/IoServer.php +++ b/src/Ratchet/Server/IoServer.php @@ -1,5 +1,7 @@ loop = $loop; $this->app = $app; + $this->socket = $socket; $socket->on('connection', array($this, 'handleConnect')); @@ -50,6 +59,24 @@ class IoServer { $this->handlers[1] = array($this, 'handleEnd'); $this->handlers[2] = array($this, 'handleError'); } + + /** + * Returns the Ratchet App + * + * @return \Ratchet\MessageComponentInterface + */ + public function getApp() { + return $this->app; + } + + /** + * Returns the Socket + * + * @return \React\Socket\ServerInterface + */ + public function getSocket() { + return $this->socket; + } /** * @param \Ratchet\MessageComponentInterface $component The application that I/O will call when events are received