mxmbsocket/tests/Ratchet/Tests/Mock/Protocol.php
Chris Boden f9d609074c Moar cleaning
Added a few unit tests
Added MIT license
Changed Array's to array's
2011-11-01 11:01:43 -04:00

31 lines
750 B
PHP

<?php
namespace Ratchet\Tests\Mock;
use Ratchet\SocketObserver;
use Ratchet\Protocol\ProtocolInterface;
use Ratchet\Server;
use Ratchet\SocketInterface;
class Protocol implements ProtocolInterface {
public function __construct(SocketObserver $application) {
}
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) {
}
}