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

Function invokeStringMethodAsync

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

Source from the content-addressed store, hash-verified

77}
78
79void invokeStringMethodAsync(jcon::JsonRpcClient* rpc_client)
80{
81 auto req = rpc_client->callAsync("printMessage", "hello, world");
82
83 req->connect(req.get(), &jcon::JsonRpcRequest::result,
84 [](const QVariant& result) {
85 qDebug() << "result of asynchronous RPC call:" << result;
86 });
87
88 req->connect(req.get(), &jcon::JsonRpcRequest::error,
89 [](int code, const QString& message, const QVariant& data) {
90 qDebug() << "RPC error:" << message
91 << " (" << code << ")";
92 });
93}
94
95void invokeStringMethodSync(jcon::JsonRpcClient* rpc_client)
96{

Callers 1

mainFunction · 0.85

Calls 2

callAsyncMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected