Skip to content

Instantly share code, notes, and snippets.

@harendra21
Created February 25, 2019 10:23
Embed
What would you like to do?
<?php
use Ratchet\Server\IoServer;
use Ratchet\Http\HttpServer;
use Ratchet\WebSocket\WsServer;
use App\Chat;
require dirname(__DIR__) . '/vendor/autoload.php';
$server = IoServer::factory(
new HttpServer(
new WsServer(
new Chat()
)
),
8080
);
$server->run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment