aboutsummaryrefslogtreecommitdiffhomepage
path: root/assets/php/Chatserver/bin/WebChatServer.php
blob: 15f573bb0a65bf81e9edf0e2a00ce1ff130832dc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
require '../../vendor/autoload.php';

use Ratchet\Server\IoServer;
use Ratchet\Http\HttpServer;
use Ratchet\WebSocket\WsServer;
use Websocket\ChatProcessor;

$server = IoServer::factory(
    new HttpServer(
        new WsServer(
            new ChatProcessor()
        )
    ),
    1338
);

$server->run();