Skip to content

Instantly share code, notes, and snippets.

@slax0rr
Created July 25, 2017 06:31
Show Gist options
  • Save slax0rr/34cef0442d8b4385ca2fdcf7d39324f4 to your computer and use it in GitHub Desktop.
Save slax0rr/34cef0442d8b4385ca2fdcf7d39324f4 to your computer and use it in GitHub Desktop.
<?php
use Ratchet\Server\IoServer;
use Ratchet\Http\HttpServer;
use Ratchet\WebSocket\WsServer;
class Ratchet extends CI_Controller
{
public function start()
{
IoServer::factory(
new HttpServer(
new WsServer(
new RatchetHandler($this)
)
),
8888
)->run();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment