Variation of helloworld that does not use a broker, but listens for incoming connections itself. It establishes a connection to itself with a link over which a single message is sent. This demonstrates the ease with which a simple daemon an be built using the API.
#include "proton/acceptor.hpp"
#include "proton/container.hpp"
#include "proton/event.hpp"
#include "proton/handler.hpp"
#include <iostream>
private:
public:
}
}
}
}
acceptor.close();
}
};
int main(int argc, char **argv) {
try {
std::string url = argc > 1 ? argv[1] : "127.0.0.1:8888/examples";
hello_world_direct hwd(url);
return 0;
} catch (const std::exception& e) {
std::cerr << e.what() << std::endl;
}
return 1;
}