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

Function main

cpp/examples/direct_send.cpp:90–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88};
89
90int main(int argc, char **argv) {
91 std::string address("127.0.0.1:5672/examples");
92 int message_count = 100;
93 example::options opts(argc, argv);
94
95 opts.add_value(address, 'a', "address", "listen and send on URL", "URL");
96 opts.add_value(message_count, 'm', "messages", "send COUNT messages", "COUNT");
97
98 try {
99 opts.parse();
100
101 simple_send send(address, message_count);
102 proton::container(send).run();
103 return 0;
104 } catch (const example::bad_option& e) {
105 std::cout << opts << std::endl << e.what() << std::endl;
106 } catch (const std::exception& e) {
107 std::cerr << e.what() << std::endl;
108 }
109
110 return 1;
111}

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