LdapTools\DomainConfiguration::getConnectTimeout PHP Méthode

getConnectTimeout() public méthode

Get the initial connection timeout value (seconds). This is how long it will wait when making the initial connection attempt to the LDAP server before it considers it unreachable/down.
public getConnectTimeout ( ) : integer
Résultat integer
    public function getConnectTimeout()
    {
        return $this->config['connectTimeout'];
    }

Usage Example

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