public function connect($url, $cb, $class = null)
    {
        if ($class === null) {
            $class = $this->connectionClass;
        }
        $conn = new $class(null, $this);
        $conn->connect($url, $cb);
        return $conn;
    }
public function connect($url, $cb, $class = null)
    {
        if ($class === null) {
            $class = $this->connectionClass;
        }
        $conn = new $class(null, $this);
        $conn->connect($url, $cb);
        return $conn;
    }
public function connect ( $ url , $ cb , $ class = null ) { if ( $ class === null ) { $ class = $ this -> connectionClass ; } $ conn = new $ class ( null , $ this ) ; $ conn -> connect ( $ url , $ cb ) ; return $ conn ; }
Establish a connection with remote peer
@param  string $url URL
@param  callback $cb Callback
@param  string $class Optional. Connection class name
@return integer         Connection's ID. Boolean false when failed
Establish a connection with remote peer