| 585 | } |
| 586 | |
| 587 | void 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 | |
| 605 | ExtMsgInsert::ExtMsgInsert(ExtMsgHeader* header, const uint8_t* body) : header(header) { |
| 606 | const uint8_t* ptr = body; |
no outgoing calls
no test coverage detected