mxmbsocket/tests/Ratchet/Tests/Mock/Protocol.php
Chris Boden 47b7110dc1 Namespaces
Fixed all the namespaces to match new folder structure
2011-11-12 20:51:54 -05:00

34 lines
833 B
PHP

<?php
namespace Ratchet\Tests\Mock;
use Ratchet\ObserverInterface;
use Ratchet\Application\ProtocolInterface;
use Ratchet\Server;
use Ratchet\SocketInterface;
class Protocol implements ProtocolInterface {
public function __construct(ObserverInterface $app = null) {
}
public static function getDefaultConfig() {
return array(
'domain' => AF_INET
, 'type' => SOCK_STREAM
, 'protocol' => SOL_TCP
, 'options' => array(
SOL_SOCKET => array(SO_REUSEADDR => 1)
)
);
}
public function onOpen(SocketInterface $conn) {
}
public function onRecv(SocketInterface $from, $msg) {
}
public function onClose(SocketInterface $conn) {
}
public function onError(SocketInterface $conn, \Exception $e) {
}
}