<?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(); } }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
EchoServer.php | File | 592 B | 0644 |
|
FlashPolicy.php | File | 6.14 KB | 0644 |
|
IoConnection.php | File | 675 B | 0644 |
|
IoServer.php | File | 4.38 KB | 0644 |
|
IpBlackList.php | File | 2.7 KB | 0644 |
|