Disque\Connection\Socket::connect PHP Method

connect() public method

public connect ( $connectionTimeout, $responseTimeout = null )
    public function connect($connectionTimeout = 0, $responseTimeout = null)
    {
        parent::connect($connectionTimeout, $responseTimeout);
        $this->socket = $this->getSocket($this->host, $this->port, (double) $connectionTimeout);
        if (!is_resource($this->socket)) {
            throw new ConnectionException("Could not connect to {$this->host}:{$this->port}");
        }
        stream_set_blocking($this->socket, 1);
        if (!is_null($responseTimeout)) {
            stream_set_timeout($this->socket, $responseTimeout);
        }
    }