api.emotionhero.com/bin/socket_server.php

27 lines
500 B
PHP
Raw Normal View History

2016-11-01 22:35:27 +01:00
#!/usr/bin/php
<?php
chdir(__DIR__);
// define('APPLICATION_ENV', 'development');
require_once __DIR__ . "/../bootstrap.php";
error_reporting(E_ALL);
ini_set('display_errors',1);
// Show table creation statements
// And (re)generate Proxies
use Ratchet\WebSocket\WsServer;
use Ratchet\Http\HttpServer;
use Ratchet\Server\IoServer;
$server = IoServer::factory(
new HttpServer(
new WsServer(
new EmotionHero\Server\Websockets()
)
),
8181
);
$server->run();