MCPcopy Create free account
hub / github.com/OpenImageDebugger/OpenImageDebugger / send

Method send

src/ipc/message_exchange.h:185–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183 }
184
185 void send(ITransport& transport) const {
186 std::size_t total = 0;
187 for (const auto& block : message_blocks_) {
188 total += block->size();
189 }
190 std::vector<std::byte> frame;
191 frame.reserve(total);
192 for (const auto& block : message_blocks_) {
193 const auto* data = block->data();
194 frame.insert(frame.end(), data, data + block->size());
195 }
196 if (!frame.empty()) {
197 transport.send(frame);
198 }
199 }
200
201 void clear() {
202 message_blocks_.clear();

Callers

nothing calls this directly

Calls 3

endMethod · 0.80
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected