proton::connection_engine
example to send a "Hello World" message to itself. Compare with the corresponding proton::container
example helloworld.cpp.
#include "proton/event.hpp"
#include "proton/handler.hpp"
#include "proton/url.hpp"
#include "proton/io.hpp"
#include <iostream>
private:
std::string address_;
public:
hello_world(const std::string& address) : address_(address) {}
}
}
}
};
int main(int argc, char **argv) {
try {
proton::url url(argc > 1 ? argv[1] :
"127.0.0.1:5672/examples");
hello_world hw(url.path());
return 0;
} catch (const std::exception& e) {
std::cerr << e.what() << std::endl;
}
return 1;
}