public function onOpen(ConnectionInterface $conn)
{
Logger::debug($this, "RatchetTransportProvider::onOpen");
$transport = new RatchetTransport($conn, $this->loop);
// this will need to be a little more dynamic at some point
$transport->setSerializer(new JsonSerializer());
$transport->setTrusted($this->trusted);
$session = $this->router->createNewSession($transport);
$this->sessions->attach($conn, $session);
$this->router->getEventDispatcher()->dispatch("connection_open", new ConnectionOpenEvent($session));
}