PHP Classes

File: bin/realtimedata.php

Recommend this page to a friend!
  Classes of butani kartik   PHP WebSockets Server Example   bin/realtimedata.php   Download  
File: bin/realtimedata.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP WebSockets Server Example
Example to interact with a server using WebSockets
Author: By
Last change:
Date: 2 years ago
Size: 360 bytes
 

Contents

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

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

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

   
$server->run();