MCPcopy Create free account
hub / github.com/Segs/Segs / invokeMethodSync

Function invokeMethodSync

3rd_party/jcon-cpp/src/main.cpp:66–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66void invokeMethodSync(jcon::JsonRpcClient* rpc_client)
67{
68 qsrand(std::time(nullptr));
69
70 auto result = rpc_client->call("getRandomInt", 100);
71
72 if (result->isSuccess()) {
73 qDebug() << "result of synchronous RPC call:" << result->result();
74 } else {
75 qDebug() << "RPC error:" << result->toString();
76 }
77}
78
79void invokeStringMethodAsync(jcon::JsonRpcClient* rpc_client)
80{

Callers 1

mainFunction · 0.85

Calls 4

isSuccessMethod · 0.80
resultMethod · 0.80
callMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected