diff --git a/Server/Type/WebSocketServerType.php b/Server/Type/WebSocketServerType.php index 369b2a5..50eaa77 100644 --- a/Server/Type/WebSocketServerType.php +++ b/Server/Type/WebSocketServerType.php @@ -48,7 +48,14 @@ private function setupServer() $this->loop = \React\EventLoop\Factory::create(); $this->socket = new \React\Socket\Server($this->loop); - + + foreach ($this->container->getParameter('jdare_clank.topic_services') as $topic) { + $service = $this->container->get($topic['service']); + if (method_exists($service, 'startZmq')) { + $service->startZmq($this->loop); + } + } + if ($this->host) { $this->socket->listen($this->port, $this->host); @@ -142,4 +149,4 @@ public function getSession() return $this->session; } -} \ No newline at end of file +}