public function stop() {
      if ($this->isStopping)
        return;
      $this->isStopping = true;

      $this->buffer = '';
      $this->connectRetryCount = 0;
      $this->readRetryCount = 0;

      if ($this->request) {
        $this->request->close();
        $this->request = null;
      }
      if ($this->response) {
        $this->response->close();
        $this->response = null;
      }

      $this->isStopping = false;
    }