DistributedServer::onConnect PHP Method

onConnect() public method

public onConnect ( $serv, $fd )
    public function onConnect($serv, $fd)
    {
        $this->connectioninfo = $serv->connection_info($fd);
        $localinfo = swoole_get_local_ip();
        $this->localip = current($localinfo);
        if ($this->localip != $this->connectioninfo['remote_ip']) {
            $this->client_pool[ip2long($this->connectioninfo['remote_ip'])] = array('fd' => $fd, 'remote_ip' => $this->connectioninfo['remote_ip']);
        }
    }