synapse\network\synlib\SynapseClient::isNeedAuth PHP Méthode

isNeedAuth() public méthode

public isNeedAuth ( ) : boolean
Résultat boolean
    public function isNeedAuth() : bool
    {
        return $this->needAuth;
    }

Usage Example

 public function process()
 {
     while (strlen($buffer = $this->client->readThreadToMainPacket()) > 0) {
         $this->handlePacket($buffer);
     }
     $this->connected = $this->client->isConnected();
     if ($this->client->isNeedAuth()) {
         $this->synapse->connect();
         $this->client->setNeedAuth(false);
     }
 }