Skip to content

Instantly share code, notes, and snippets.

@dwolfhub
Created April 23, 2014 16:06
Show Gist options
  • Save dwolfhub/11221506 to your computer and use it in GitHub Desktop.
Save dwolfhub/11221506 to your computer and use it in GitHub Desktop.
Chatter web server code using ratchet
<?php
use Ratchet\Server\IoServer;
use Ratchet\Http\HttpServer;
use Ratchet\WebSocket\WsServer;
use Chatter\Chatter;
require 'vendor/autoload.php';
$server = IoServer::factory(
new HttpServer(
new WsServer(
new Chatter()
)
),
8000
);
$server->run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment