|
NexusForce 1.0.0
A rigorously engineered full-stack C++ backend library.
|
HTTP Chunked Transfer Encoding 读取器 更多...
#include <chunked_reader.hpp>
Public 成员函数 | |
| bool | next_chunk (byte_vector &out) |
| 读取下一个chunk | |
| const unordered_map< string, string > & | trailers () const noexcept |
| 获取所有trailer头部 | |
| byte_size | total_read () const noexcept |
| 获取已读取的总体积 | |
| bool | is_complete () const noexcept |
| 检查是否已完成所有chunk的读取 | |
Public 属性 | |
| byte_size | max_chunk_size {1_MB} |
| 单chunk最大大小 | |
| byte_size | max_total_size {100_MB} |
| 总请求体最大大小 | |
| milliseconds | read_timeout {30000} |
| 读取超时 | |
HTTP Chunked Transfer Encoding 读取器
按RFC 7230第4.1节实现分块传输解码。 从socket逐块读取数据,处理chunk-size、chunk-data、trailer。
使用示例:
在文件 chunked_reader.hpp 第 38 行定义.
| bool neforce::http::chunked_body_reader::next_chunk | ( | byte_vector & | out | ) |
|
inlinenodiscardnoexcept |