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

Method poll

src/host/ipc/ipc_client.cpp:42–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40 : transport_(transport), model_(model) {}
41
42void IpcClient::poll() {
43 while (transport_.has_data()) {
44 try {
45 auto header = oid::MessageType{};
46 oid::MessageDecoder{transport_}.read(header);
47 dispatch(header);
48 } catch (const std::runtime_error&) { // SocketTimeoutError, base catch
49 return; // cross-shared-lib RTTI-safe; drop the partial message
50 }
51 }
52}
53
54void IpcClient::dispatch(oid::MessageType header) {
55 using enum oid::MessageType;

Callers 2

mainFunction · 0.80
TESTFunction · 0.80

Calls 1

has_dataMethod · 0.45

Tested by 1

TESTFunction · 0.64