| 14 | using namespace std; |
| 15 | |
| 16 | int main() { |
| 17 | |
| 18 | execlp("redis-server", "redis-server", "-v", NULL); |
| 19 | |
| 20 | RedisClient client("127.0.0.1", 6379, "example"); |
| 21 | client.SetTimeout(1); |
| 22 | Client c(client); |
| 23 | |
| 24 | Json::Value params; |
| 25 | params["name"] = "Peter"; |
| 26 | Json::Value params2; |
| 27 | |
| 28 | try { |
| 29 | cout << c.CallMethod("sayHello", params) << endl; |
| 30 | c.CallNotification("notifyServer", params2); |
| 31 | } catch (JsonRpcException &e) { |
| 32 | cerr << e.what() << endl; |
| 33 | } |
| 34 | } |
nothing calls this directly
no test coverage detected