MCPcopy Create free account
hub / github.com/bitcoin-sv/bitcoin-sv / WriteReplyChunk

Method WriteReplyChunk

src/httpserver.cpp:547–557  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

545}
546
547void HTTPRequest::WriteReplyChunk(std::string_view strReply) {
548 struct evbuffer *evb = evbuffer_new();
549 evbuffer_add(evb, strReply.data(), strReply.length());
550
551 // Send event to main http thread to send reply message
552 HTTPEvent *ev = new HTTPEvent(eventBase, true, std::bind(evhttp_send_reply_chunk, req, evb));
553 ev->trigger(nullptr);
554
555 HTTPEvent *evDel = new HTTPEvent(eventBase, true, std::bind(evbuffer_free, evb));
556 evDel->trigger(nullptr);
557}
558
559void HTTPRequest::StopWritingChunks() {
560 HTTPEvent *ev = new HTTPEvent(eventBase, true, std::bind(evhttp_send_reply_end, req));

Callers 8

queryBlacklistFunction · 0.80
JSONRPCExecOneFunction · 0.80
JSONRPCExecBatchFunction · 0.80
callMethod · 0.80
WriteToBuffMethod · 0.80
FlushNonVirtualMethod · 0.80

Calls 2

triggerMethod · 0.80
dataMethod · 0.45

Tested by

no test coverage detected