From b1f68b95633f7932f34882a5c57a2d52ce182d5b Mon Sep 17 00:00:00 2001 From: ziyue <1213642868@qq.com> Date: Fri, 24 Dec 2021 19:57:03 +0800 Subject: [PATCH] =?UTF-8?q?Splitter=E5=85=AC=E5=BC=80=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Http/HttpRequestSplitter.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/Http/HttpRequestSplitter.h b/src/Http/HttpRequestSplitter.h index 01e77df0..e7a0846c 100644 --- a/src/Http/HttpRequestSplitter.h +++ b/src/Http/HttpRequestSplitter.h @@ -31,6 +31,21 @@ public: */ virtual void input(const char *data, size_t len); + /** + * 恢复初始设置 + */ + void reset(); + + /** + * 剩余数据大小 + */ + size_t remainDataSize(); + + /** + * 获取剩余数据指针 + */ + const char *remainData() const; + protected: /** * 收到请求头 @@ -65,21 +80,6 @@ protected: */ void setContentLen(ssize_t content_len); - /** - * 恢复初始设置 - */ - void reset(); - - /** - * 剩余数据大小 - */ - size_t remainDataSize(); - - /** - * 获取剩余数据指针 - */ - const char *remainData() const; - private: ssize_t _content_len = 0; size_t _remain_data_size = 0;