MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / write_multipart_ranges_data

Function write_multipart_ranges_data

examples/server/httplib.h:4414–4427  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4412
4413template <typename T>
4414inline bool write_multipart_ranges_data(Stream &strm, const Request &req,
4415 Response &res,
4416 const std::string &boundary,
4417 const std::string &content_type,
4418 const T &is_shutting_down) {
4419 return process_multipart_ranges_data(
4420 req, res, boundary, content_type,
4421 [&](const std::string &token) { strm.write(token); },
4422 [&](const std::string &token) { strm.write(token); },
4423 [&](size_t offset, size_t length) {
4424 return write_content(strm, res.content_provider_, offset, length,
4425 is_shutting_down);
4426 });
4427}
4428
4429inline std::pair<size_t, size_t>
4430get_range_offset_and_length(const Request &req, const Response &res,

Callers 1

Calls 3

write_contentFunction · 0.85
writeMethod · 0.45

Tested by

no test coverage detected