PHP Classes

File: app.php

Recommend this page to a friend!
  Classes of Rodrigo Faustino   Exchange chat messages using Ratchet Websockets   app.php   Download  
File: app.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Exchange chat messages using Ratchet Websockets
Exchange chat messages using Ratchet Websockets
Author: By
Last change:
Date: 8 months ago
Size: 312 bytes
 

Contents

Class file image Download
<?php

use Ratchet\Server\IoServer;
use
Ratchet\Http\HttpServer;
use
Ratchet\WebSocket\WsServer;
use
MyApp\Socket;

require
dirname( __FILE__ ) . '/vendor/autoload.php';

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

$server->run();