Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | public static function is_server_running() |
||
19 | { |
||
20 | echo 'Running server...' . PHP_EOL; |
||
21 | |||
22 | $config = new ServerConfig(); |
||
23 | $config->setIsSsl(true)->setAllowSelfSigned(true) |
||
24 | ->setCryptoType(STREAM_CRYPTO_METHOD_SSLv23_SERVER) |
||
25 | ->setLocalCert("./tests/certs/cert.pem")->setLocalPk("./tests/certs/key.pem") |
||
26 | ->setPort(8888); |
||
27 | |||
28 | $websocketServer = new WebSocketServer(new ServerHandler(), $config); |
||
29 | $websocketServer->run(); |
||
30 | } |
||
31 | } |