PHP Classes

File: server.php

Recommend this page to a friend!
  Classes of Stanley Aloh   Tic Tac Toe Multiplayer   server.php   Download  
File: server.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Tic Tac Toe Multiplayer
Manage the interactions ofTic-Tac-Toe game players
Author: By
Last change:
Date: 9 days ago
Size: 704 bytes
 

Contents

Class file image Download
<?php
   
use Ratchet\Server\IoServer;
    use
Ratchet\Http\HttpServer;
    use
Ratchet\WebSocket\WsServer;
    use
MyApp\Chat;

   
$rootDirectory = __DIR__;
   
    require
__DIR__ .'/vendor/autoload.php';
    require
$rootDirectory . '/models/player.php';
    require
$rootDirectory . '/models/Board.php';
    require
$rootDirectory . '/models/player_board.php';
    require
$rootDirectory . '/models/Registrar.php';
    require
$rootDirectory . '/controller/Game_controller.php';
    require
$rootDirectory . '/Chat.php';

   
$server = IoServer::factory(
        new
HttpServer(
            new
WsServer(
                new
Chat()
            )
        ),
       
8080
   
);

   
$server->run();