This commit is contained in:
barwie2@st.amu.edu.pl 2020-03-08 21:02:58 +01:00
parent 35f0f8135f
commit eb1810ee9e

View File

@ -43,24 +43,13 @@ class WebSocketServer extends Command
*/ */
public function handle() public function handle()
{ {
$loop = Factory::create();
$webSock = new SecureServer(
new Server('0.0.0.0:8090', $loop),
$loop,
array(
'local_cert' => '/etc/letsencrypt/live/atcheck.projektstudencki.pl/cert.pem', // path to your cert
'local_pk' => '/etc/letsencrypt/live/atcheck.projektstudencki.pl/privkey.pem', // path to your server private key
'allow_self_signed' => FALSE, // Allow self signed certs (should be false in production)
'verify_peer' => FALSE
)
);
$server = IoServer::factory( $server = IoServer::factory(
new HttpServer( new HttpServer(
new WsServer( new WsServer(
new WebSocketController() new WebSocketController()
) )
), ),
$webSock 8090
); );
$server->run(); $server->run();
} }