MCPcopy Create free account
hub / github.com/FoundationDB/fdb-document-layer / write

Method write

src/ExtMsg.actor.cpp:587–603  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

585}
586
587void ExtMsgReply::write(Reference<ExtConnection> nmc) {
588 replyHeader.messageLength = sizeof(replyHeader);
589 for (const auto& document : documents) {
590 replyHeader.messageLength += document.objsize();
591 }
592
593 if (verboseLogging)
594 TraceEvent("BD_msgReply").detail("Message", toString()).detail("connId", nmc->connectionId);
595 if (verboseConsoleOutput)
596 fprintf(stderr, "S -> C: %s\n\n", toString().c_str());
597
598 nmc->bc->write(StringRef((uint8_t*)&replyHeader, sizeof(replyHeader)));
599
600 for (const auto& doc : documents) {
601 nmc->bc->write(StringRef((const uint8_t*)doc.objdata(), doc.objsize()));
602 }
603}
604
605ExtMsgInsert::ExtMsgInsert(ExtMsgHeader* header, const uint8_t* body) : header(header) {
606 const uint8_t* ptr = body;

Callers 3

Future<Void> doRunFunction · 0.45
DocLayer.actor.cppFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected