synapse\network\synlib\SynapseClient::isConnected PHP Method

isConnected() public method

public isConnected ( ) : boolean
return boolean
    public function isConnected() : bool
    {
        return $this->connected;
    }

Usage Example

コード例 #1
0
 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);
     }
 }