MCPcopy Create free account
hub / github.com/Apache553/SubtitleFontHelper / FetchResponse

Function FetchResponse

FontLoadInterceptor/RpcClient.cpp:264–275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

262
263 template <typename ReturnType>
264 ReturnType FetchResponse(wil::unique_hfile& pipe)
265 {
266 uint32_t responseLength;
267 ReadPipe(pipe.get(), &responseLength, sizeof(uint32_t));
268 std::vector<char> responseBuffer(responseLength);
269 ReadPipe(pipe.get(), responseBuffer.data(), responseLength);
270
271 ReturnType response;
272 if (!response.ParseFromArray(responseBuffer.data(), responseLength))
273 throw std::runtime_error("bad response");
274 return response;
275 }
276
277 template <>
278 void FetchResponse(wil::unique_hfile&)

Callers

nothing calls this directly

Calls 1

ReadPipeFunction · 0.85

Tested by

no test coverage detected