public function sendChunk($data, $lastChunk = false)
    {
        $this->chunked = true;

        if ($lastChunk) {
            $this->response->end($data);
        } elseif (strlen($data) > 0) {
            $this->response->write($data);
        }
    }