src/TorControl.php
public function connect()
    {
        if ($this->connected) {
            return;
        }

        $this->socket = @fsockopen($this->options['hostname'], $this->options['port'], $errno, $errstr, $this->options['timeout']);
        if (!$this->socket) {
            throw new Exception\IOError($errno.' - '.$errstr);
        }

        $this->connected = true;

        return $this;
    }
public function connect()
    {
        if ($this->connected) {
            return;
        }

        $this->socket = @fsockopen($this->options['hostname'], $this->options['port'], $errno, $errstr, $this->options['timeout']);
        if (!$this->socket) {
            throw new Exception\IOError($errno.' - '.$errstr);
        }

        $this->connected = true;

        return $this;
    }
public function connect ( ) { if ( $ this -> connected ) { return ; } $ this -> socket = @ fsockopen ( $ this -> options [ 'hostname' ] , $ this -> options [ 'port' ] , $ errno , $ errstr , $ this -> options [ 'timeout' ] ) ; if ( ! $ this -> socket ) { throw new Exception \ IOError ( $ errno . ' - ' . $ errstr ) ; } $ this -> connected = true ; return $ this ; }
Connects to the Tor server.

@throws Exception\IOError

@return \TorControl\TorControl
Connects to the Tor server .