예제 #1
0
 public function testServerNonBlocking()
 {
     // bind to random port
     $server = $this->factory->createListen(0);
     $this->assertSame($server, $server->setBlocking(false));
     return $server;
 }
예제 #2
0
 /**
  *
  * @param Socket $socket
  * @depends testCreateListenRandom
  * @expectedException Exception
  */
 public function testCreateListenInUseFails(Socket $socket)
 {
     $address = $socket->getSockName();
     $port = substr($address, strrpos($address, ':') + 1);
     $this->factory->createListen($port);
 }