 ac8644125c
			
		
	
	
		ac8644125c
		
	
	
	
	
		
			
			Major restructure, dropped aggregate idea, can't get around php golden hammer, the all mighty array, problem Unit tests broken
		
			
				
	
	
		
			34 lines
		
	
	
		
			762 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
		
			762 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| namespace Ratchet\Tests\Mock;
 | |
| use Ratchet\Protocol\ProtocolInterface;
 | |
| use Ratchet\Server;
 | |
| use Ratchet\Socket;
 | |
| 
 | |
| class Protocol implements ProtocolInterface {
 | |
|     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 getName() {
 | |
|         return 'mock_protocol';
 | |
|     }
 | |
| 
 | |
|     public function setUp(Server $server) {
 | |
|     }
 | |
| 
 | |
|     public function handleConnect(Socket $client) {
 | |
|     }
 | |
| 
 | |
|     public function handleMessage($msg, Socket $client) {
 | |
|     }
 | |
| 
 | |
|     public function handleClose(Socket $client) {
 | |
|     }
 | |
| } |