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

Function invokeStringMethodSync

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

Source from the content-addressed store, hash-verified

93}
94
95void invokeStringMethodSync(jcon::JsonRpcClient* rpc_client)
96{
97 qsrand(std::time(nullptr));
98
99 auto result = rpc_client->call("printMessage", "hello, world");
100
101 if (result->isSuccess()) {
102 qDebug() << "result of synchronous RPC call:" << result->result();
103 } else {
104 qDebug() << "RPC error:" << result->toString();
105 }
106}
107
108void invokeNotification(jcon::JsonRpcClient *rpc_client) {
109 rpc_client->notification("printNotification", "hello, world Notification");

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