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

Method on_message_complete

src/decoder.hpp:737–754  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

735 }
736
737 static int on_message_complete(http_parser* p)
738 {
739 StreamingResponseDecoder* decoder = (StreamingResponseDecoder*) p->data;
740
741 // This can happen if the callback `on_headers_complete()` had failed
742 // earlier (e.g., due to invalid status code).
743 if (decoder->writer.isNone()) {
744 CHECK(decoder->failure);
745 return http_parsing::FAILURE;
746 }
747
748 http::Pipe::Writer writer = decoder->writer.get(); // Remove const.
749 writer.close();
750
751 decoder->writer = None();
752
753 return http_parsing::SUCCESS;
754 }
755
756 bool failure;
757

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected