MCPcopy Create free account
hub / github.com/3rdparty/libprocess / decode

Method decode

src/decoder.hpp:333–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

331 }
332
333 std::deque<http::Response*> decode(const char* data, size_t length)
334 {
335 size_t parsed = http_parser_execute(&parser, &settings, data, length);
336
337 if (parsed != length) {
338 // TODO(bmahler): joyent/http-parser exposes error reasons.
339 failure = true;
340 }
341
342 if (!responses.empty()) {
343 std::deque<http::Response*> result = responses;
344 responses.clear();
345 return result;
346 }
347
348 return std::deque<http::Response*>();
349 }
350
351 bool failed() const
352 {

Callers

nothing calls this directly

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected