LdapTools\Connection\LdapServerPool::isServerAvailable PHP Method

isServerAvailable() protected method

Check if a LDAP server is up and available.
protected isServerAvailable ( string $server ) : boolean
$server string
return boolean
    protected function isServerAvailable($server)
    {
        $result = $this->tcp->connect($server, $this->config->getPort(), $this->config->getConnectTimeout());
        if ($result) {
            $this->tcp->close();
        }
        return $result;
    }