Skip to content

Instantly share code, notes, and snippets.

@cboden
cboden / example.php
Last active August 29, 2024 05:33
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(