MCPcopy Create free account
hub / github.com/Snapchat/Valdi / submitPayload

Method submitPayload

valdi/src/valdi/runtime/Debugger/DaemonClient.cpp:161–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159}
160
161void DaemonClient::submitPayload(const Value& payload) const {
162 auto data = valueToJson(payload);
163
164 auto dataSender = getDataSender();
165 if (dataSender == nullptr) {
166 return;
167 }
168
169 auto bytes = makeShared<ByteBuffer>();
170 if (dataSender->requiresPacketEncoding()) {
171 ValdiPacket::write(data->data(), data->size(), *bytes);
172 } else {
173 bytes = data;
174 }
175 dataSender->submitData(bytes->toBytesView());
176}
177
178void DaemonClient::submitRequest(Value request, Function<void(const Value&)> completionHandler) {
179 auto pendingResponse = Valdi::makeShared<DaemonClientPendingResponse>(completionHandler);

Callers

nothing calls this directly

Calls 6

valueToJsonFunction · 0.85
dataMethod · 0.45
sizeMethod · 0.45
submitDataMethod · 0.45
toBytesViewMethod · 0.45

Tested by

no test coverage detected