MCPcopy Create free account
hub / github.com/apache/qpid-proton / main

Function main

cpp/examples/client.cpp:82–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80};
81
82int main(int argc, char **argv) {
83 std::string url("127.0.0.1:5672/examples");
84 example::options opts(argc, argv);
85
86 opts.add_value(url, 'a', "address", "connect and send to URL", "URL");
87
88 try {
89 opts.parse();
90
91 std::vector<std::string> requests;
92 requests.push_back("Twas brillig, and the slithy toves");
93 requests.push_back("Did gire and gymble in the wabe.");
94 requests.push_back("All mimsy were the borogroves,");
95 requests.push_back("And the mome raths outgrabe.");
96
97 client c(url, requests);
98 proton::container(c).run();
99
100 return 0;
101 } catch (const example::bad_option& e) {
102 std::cout << opts << std::endl << e.what() << std::endl;
103 } catch (const std::exception& e) {
104 std::cerr << e.what() << std::endl;
105 }
106
107 return 1;
108}

Callers

nothing calls this directly

Calls 5

add_valueMethod · 0.80
containerClass · 0.50
parseMethod · 0.45
runMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected