Commit b2e1f7784709a811b99c36711a125d50db7f5b12
1 parent
c6dbba89
Remove connection state callback from basic example
Showing
1 changed file
with
2 additions
and
2 deletions
examples/basic.cpp
| @@ -9,7 +9,7 @@ using namespace std; | @@ -9,7 +9,7 @@ using namespace std; | ||
| 9 | 9 | ||
| 10 | int main(int argc, char* argv[]) { | 10 | int main(int argc, char* argv[]) { |
| 11 | 11 | ||
| 12 | - redox::Redox rdx = {"localhost", 6379, [](int state) { cout << "Connection state: " << state << endl; }}; // Initialize Redox | 12 | + redox::Redox rdx = {"localhost", 6379}; // Initialize Redox |
| 13 | if(!rdx.start()) return 1; // Start the event loop | 13 | if(!rdx.start()) return 1; // Start the event loop |
| 14 | 14 | ||
| 15 | rdx.del("occupation"); | 15 | rdx.del("occupation"); |
| @@ -17,7 +17,7 @@ int main(int argc, char* argv[]) { | @@ -17,7 +17,7 @@ int main(int argc, char* argv[]) { | ||
| 17 | if(!rdx.set("occupation", "carpenter")) // Set a key, check if succeeded | 17 | if(!rdx.set("occupation", "carpenter")) // Set a key, check if succeeded |
| 18 | cerr << "Failed to set key!" << endl; | 18 | cerr << "Failed to set key!" << endl; |
| 19 | 19 | ||
| 20 | - cout << "key = occupation, value = \"" << rdx.get("occupation") << "\"" << endl; | 20 | + cout << "key = \"occupation\", value = \"" << rdx.get("occupation") << "\"" << endl; |
| 21 | 21 | ||
| 22 | rdx.stop(); // Shut down the event loop | 22 | rdx.stop(); // Shut down the event loop |
| 23 | } | 23 | } |