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

Class Cap

tests/host/ipc/ipc_client_test.cpp:122–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120// Captures the bytes a MessageComposer would send, without a real socket.
121static std::vector<std::byte> frame(const MessageComposer& c) {
122 struct Cap final : ITransport {
123 std::vector<std::byte> b;
124 void send(std::span<const std::byte> d) override {
125 b.assign(d.begin(), d.end());
126 }
127 std::size_t receive(std::span<std::byte>) override {
128 return 0;
129 }
130 bool has_data() const override {
131 return false;
132 }
133 };
134 Cap cap;
135 c.send(cap);
136 return cap.b;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected