private function connect()
    {
        if (!$this->_sock) {
            if ($this->_persistentSocket) {
                $this->_sock = pfsockopen($this->_host, $this->_port, $errno, $errstr, $this->_connectTimeout/1000);
            } else {
                $this->_sock = fsockopen($this->_host, $this->_port, $errno, $errstr, $this->_connectTimeout/1000);
            }

            if (!$this->_sock) {
                throw new \Exception('Unable to connect to FastCGI application: ' . $errstr);
            }

            if (!$this->set_ms_timeout($this->_readWriteTimeout)) {
                throw new \Exception('Unable to set timeout on socket');
            }
        }
    }
private function connect()
    {
        if (!$this->_sock) {
            if ($this->_persistentSocket) {
                $this->_sock = pfsockopen($this->_host, $this->_port, $errno, $errstr, $this->_connectTimeout/1000);
            } else {
                $this->_sock = fsockopen($this->_host, $this->_port, $errno, $errstr, $this->_connectTimeout/1000);
            }

            if (!$this->_sock) {
                throw new \Exception('Unable to connect to FastCGI application: ' . $errstr);
            }

            if (!$this->set_ms_timeout($this->_readWriteTimeout)) {
                throw new \Exception('Unable to set timeout on socket');
            }
        }
    }
private function connect ( ) { if ( ! $ this -> _sock ) { if ( $ this -> _persistentSocket ) { $ this -> _sock = pfsockopen ( $ this -> _host , $ this -> _port , $ errno , $ errstr , $ this -> _connectTimeout / 1000 ) ; } else { $ this -> _sock = fsockopen ( $ this -> _host , $ this -> _port , $ errno , $ errstr , $ this -> _connectTimeout / 1000 ) ; } if ( ! $ this -> _sock ) { throw new \ Exception ( 'Unable to connect to FastCGI application: ' . $ errstr ) ; } if ( ! $ this -> set_ms_timeout ( $ this -> _readWriteTimeout ) ) { throw new \ Exception ( 'Unable to set timeout on socket' ) ; } } }
Create a connection to the FastCGI application
Create a connection to the FastCGI application