/** * @expectedException RuntimeException */ public function testCheckSslPasswordTimeout() { $client = new Client(); $this->assertFalse($client->getStatus('hasSsl')); $client->setStatus('hasSsl', true); $this->assertTrue($client->getStatus('hasSsl')); $client->setSslMsgCount(Client::SSL_PASSWORD_MSG_MAX + 10); $this->assertEquals(110, $client->getSslMsgCount()); $client->checkSslPasswordTimeout(); }
private function clientRemove(Client $client) { $this->log->debug('client remove: ' . $client->getId()); if ($client->getStatus('isChannelLocal') || $client->getStatus('isChannelPeer')) { $this->consoleSetModeChannel(false); $this->consoleSetModeChannelClient(null); #$this->consoleMsgAdd(); $this->consoleMsgAdd('Connection to ' . $client->getUri() . ' closed.', true, true, true); } $client->shutdown(); $this->getKernel()->incSettingsTrafficIn($client->resetTrafficIn()); $this->getKernel()->incSettingsTrafficOut($client->resetTrafficOut()); $clientsId = $client->getId(); unset($this->clients[$clientsId]); }