public function testServerNonBlocking() { // bind to random port $server = $this->factory->createListen(0); $this->assertSame($server, $server->setBlocking(false)); return $server; }
/** * * @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); }