1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-06 03:50:04 +02:00
Oinktube/plugin/LiveChat/chat-server.php
2020-01-14 11:27:40 -03:00

23 lines
No EOL
601 B
PHP

<?php
use Ratchet\Server\IoServer;
use Ratchet\Http\HttpServer;
use Ratchet\WebSocket\WsServer;
use MyApp\Chat;
require_once dirname(__FILE__) . '/../../videos/configuration.php';
require_once $global['systemRootPath'] . 'plugin/LiveChat/ratchet/autoload.php';
require_once $global['systemRootPath'] . 'plugin/LiveChat/Chat.php';
require_once $global['systemRootPath'] . 'plugin/LiveChat/LiveChat.php';
$lc = new LiveChat();
$obj = $lc->getDataObject();
$server = IoServer::factory(
new HttpServer(
new WsServer(
new Chat()
)
),
$obj->port
);
$server->run();