Skip to content

Instantly share code, notes, and snippets.

View cboden's full-sized avatar
📉
Munging data

Chris Boden cboden

📉
Munging data
View GitHub Profile
@cboden
cboden / MyApp1.php
Created June 19, 2012 12:43
TempRouter
<?php
use Ratchet\MessageComponentInterface;
use Ratchet\ConnectionInterface;
class MyApp1 implements MessageComponentInterface {
public function onOpen(ConnectionInterface $conn) {
}
public function onMessage(ConnectionInterface $from, $msg) {
}
@cboden
cboden / example.php
Last active February 11, 2024 14:38
Ratchet Routing
<?php
$collection = new RouteCollection;
$collection->add('chatRoom', new Route('/demo', array(
'_controller' => new ChatRoom
, 'allowedOrigins' => 'socketo.me'
)));
$collection->add('echo', new Route('/echo', array(