Exemple #1
0
 /**
  * @test
  */
 public function can_close_on_server_disconnect()
 {
     $container = ContainerImpl::getInstance($this->_properties);
     $server = $container->getBean('Server');
     $server->open();
     MyServerHandler::doClient($container->getBean('Client6'));
     $server->close();
     $this->assertEquals(MyClientHandler666::$data, "disconnect");
 }
Exemple #2
0
 public function handleData(\Ding\Helpers\Tcp\TcpPeer $peer)
 {
     $buffer = '';
     $len = 1024;
     $peer->read($buffer, $len);
     self::$data = $buffer;
 }