完善http服务器对不固定长度body的支持

This commit is contained in:
xiongziliang
2019-12-24 10:25:28 +08:00
parent 40c2326950
commit eb89a3e504
3 changed files with 13 additions and 15 deletions

View File

@@ -52,14 +52,14 @@ public:
virtual ~HttpBody(){}
/**
* 剩余数据大小
* 剩余数据大小,如果返回>=INT64_MAX, 那么就不设置content-length
*/
virtual uint64_t remainSize() { return 0;};
/**
* 读取一定字节数返回大小可能小于size
* @param size 请求大小
* @return 字节对象
* @return 字节对象,如果读完了那么请返回nullptr
*/
virtual Buffer::Ptr readData(uint32_t size) { return nullptr;};
};