public function streaming_request($method, $url, $params=array(), $callback='') {
    if ( ! empty($callback) ) {
      if ( ! is_callable($callback) ) {
        return false;
      }
      $this->config['streaming_callback'] = $callback;
    }
    $this->metrics['start']          = time();
    $this->metrics['interval_start'] = $this->metrics['start'];
    $this->metrics['messages']       = 0;
    $this->metrics['last_messages']  = 0;
    $this->metrics['bytes']          = 0;
    $this->metrics['last_bytes']     = 0;
    $this->config['is_streaming']    = true;
    $this->request($method, $url, $params);
  }
public function streaming_request($method, $url, $params=array(), $callback='') {
    if ( ! empty($callback) ) {
      if ( ! is_callable($callback) ) {
        return false;
      }
      $this->config['streaming_callback'] = $callback;
    }
    $this->metrics['start']          = time();
    $this->metrics['interval_start'] = $this->metrics['start'];
    $this->metrics['messages']       = 0;
    $this->metrics['last_messages']  = 0;
    $this->metrics['bytes']          = 0;
    $this->metrics['last_bytes']     = 0;
    $this->config['is_streaming']    = true;
    $this->request($method, $url, $params);
  }
public function streaming_request ( $ method , $ url , $ params = array ( ) , $ callback = '' ) { if ( ! empty ( $ callback ) ) { if ( ! is_callable ( $ callback ) ) { return false ; } $ this -> config [ 'streaming_callback' ] = $ callback ; } $ this -> metrics [ 'start' ] = time ( ) ; $ this -> metrics [ 'interval_start' ] = $ this -> metrics [ 'start' ] ; $ this -> metrics [ 'messages' ] = 0 ; $ this -> metrics [ 'last_messages' ] = 0 ; $ this -> metrics [ 'bytes' ] = 0 ; $ this -> metrics [ 'last_bytes' ] = 0 ; $ this -> config [ 'is_streaming' ] = true ; $ this -> request ( $ method , $ url , $ params ) ; }
Make a long poll HTTP request using this library. This method is
different to the other request methods as it isn't supposed to disconnect

Using this method expects a callback which will receive the streaming
responses.

@param string $method the HTTP method being used. e.g. POST, GET, HEAD etc
@param string $url the request URL without query string parameters
@param array $params the request parameters as an array of key=value pairs
@param string $callback the callback function to stream the buffer to.
@return void
Make a long poll HTTP request using this library . This method is different to the other request methods as it isn t supposed to disconnect