Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
31 | protected function execute(InputInterface $input, OutputInterface $output) |
||
32 | { |
||
33 | // Initialize |
||
34 | $wsConfig = $this->getContainer()->getParameter('afsy_chat.websocket'); |
||
35 | |||
36 | // Create server and run it! |
||
37 | $server = IoServer::factory( |
||
38 | new HttpServer(new WsServer(new Chat())), |
||
39 | $wsConfig['port'], |
||
40 | $wsConfig['host'] |
||
41 | ); |
||
42 | echo sprintf('Run server on %s:%s'."\n", $wsConfig['host'], $wsConfig['port']); |
||
43 | $server->run(); |
||
44 | } |
||
46 |