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

Function startClient

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

Source from the content-addressed store, hash-verified

31}
32
33jcon::JsonRpcClient* startClient(QObject* parent, bool tcp = true)
34{
35 jcon::JsonRpcClient* rpc_client;
36 if (tcp) {
37 rpc_client = new jcon::JsonRpcTcpClient(parent);
38 rpc_client->connectToServer("127.0.0.1", 6002);
39 } else {
40 rpc_client = new jcon::JsonRpcWebSocketClient(parent);
41 // This is just to illustrate the fact that connectToServer also accepts
42 // a QUrl argument.
43 rpc_client->connectToServer(QUrl("ws://127.0.0.1:6002"));
44 }
45 return rpc_client;
46}
47
48void invokeMethodAsync(jcon::JsonRpcClient* rpc_client)
49{

Callers 1

mainFunction · 0.85

Calls 2

QUrlClass · 0.85
connectToServerMethod · 0.80

Tested by

no test coverage detected