From 91f370e925849a9ce558867d3eb5cfcac8fdbb20 Mon Sep 17 00:00:00 2001 From: ziyue <1213642868@qq.com> Date: Mon, 2 Aug 2021 15:53:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9EremainData=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Http/HttpRequestSplitter.cpp | 4 ++++ src/Http/HttpRequestSplitter.h | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/src/Http/HttpRequestSplitter.cpp b/src/Http/HttpRequestSplitter.cpp index 89554c90..6b4c0123 100644 --- a/src/Http/HttpRequestSplitter.cpp +++ b/src/Http/HttpRequestSplitter.cpp @@ -126,6 +126,10 @@ size_t HttpRequestSplitter::remainDataSize() { return _remain_data_size; } +const char *HttpRequestSplitter::remainData() const { + return _remain_data.data(); +} + } /* namespace mediakit */ diff --git a/src/Http/HttpRequestSplitter.h b/src/Http/HttpRequestSplitter.h index 6e77a7c9..01e77df0 100644 --- a/src/Http/HttpRequestSplitter.h +++ b/src/Http/HttpRequestSplitter.h @@ -75,6 +75,11 @@ protected: */ size_t remainDataSize(); + /** + * 获取剩余数据指针 + */ + const char *remainData() const; + private: ssize_t _content_len = 0; size_t _remain_data_size = 0;