Author: Vasily Zorin (maintainer@daemon.io)
Inheritance: extends Generic
Exemplo n.º 1
0
 /**
  * Sets peer name
  * @param  string  $host Hostname
  * @param  integer $port Port
  * @return void
  */
 public function setPeername($host, $port)
 {
     $this->host = $host;
     $this->port = $port;
     $this->addr = '[' . $this->host . ']:' . $this->port;
     if ($this->pool->allowedClients !== null) {
         if (!TCP::netMatch($this->pool->allowedClients, $this->host)) {
             Daemon::log('Connection is not allowed (' . $this->host . ')');
             $this->ready = false;
             $this->finish();
         }
     }
 }