PHP Classes

File: server.php

Recommend this page to a friend!
  Classes of Hillary Kollan   Chatto PHP Websocket Chat System   server.php   Download  
File: server.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Chatto PHP Websocket Chat System
Websocket based chat system using Ratchet library
Author: By
Last change:
Date: 3 years ago
Size: 345 bytes
 

Contents

Class file image Download
<?php
require('vendor/autoload.php');
use
Ratchet\Server\IoServer;
use
Ratchet\Http\HttpServer;
use
Ratchet\WebSocket\WsServer;
use
App\Controllers\ChatController;

/**
 * Serve on port 8080
 */
$server = IoServer::factory(
    (new
HttpServer(
        new
WsServer(
            (new
ChatController())
        )))
    ,
8080);
$server->run();