public function onOpen(\Ratchet\ConnectionInterface $conn) { $conn->session = Ratchet::get_session($conn); }