%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/ugotscom/kma/vendor/cboden/ratchet/src/Ratchet/Server/
Upload File :
Create Path :
Current File : /home/ugotscom/kma/vendor/cboden/ratchet/src/Ratchet/Server/EchoServer.php

<?php
namespace Ratchet\Server;
use Ratchet\MessageComponentInterface;
use Ratchet\ConnectionInterface;

/**
 * A simple Ratchet application that will reply to all messages with the message it received
 */
class EchoServer implements MessageComponentInterface {
    public function onOpen(ConnectionInterface $conn) {
    }

    public function onMessage(ConnectionInterface $from, $msg) {
        $from->send($msg);
    }

    public function onClose(ConnectionInterface $conn) {
    }

    public function onError(ConnectionInterface $conn, \Exception $e) {
        $conn->close();
    }
}

Zerion Mini Shell 1.0