void on_container_start(proton::container& c) override {
     auto&& copts = proton::connection_options()
         .sasl_allow_insecure_mechs(true)
         .sasl_allowed_mechs("ANONYMOUS PLAIN")
     ;
     c.listen("0.0.0.0", copts);
 }
 // Connect to url
 receiver(proton::container& cont, const std::string& url, const std::string& address)
     : work_queue_(0), closed_(false)
 {
     // NOTE:credit_window(0) disables automatic flow control.
     // We will use flow control to match AMQP credit to buffer capacity.
     cont.open_receiver(url+"/"+address, proton::receiver_options().credit_window(0),
                        proton::connection_options().handler(*this));
 }
Beispiel #3
0
    void on_container_start(proton::container &c) override {
        // Configure listener.  Details vary by platform.
        ssl_certificate server_cert = platform_certificate("tserver", "tserverpw");
        ssl_server_options ssl_srv(server_cert);
        connection_options server_opts;
        server_opts.ssl_server_options(ssl_srv).handler(&s_handler);
        c.server_connection_options(server_opts);

        // Configure client with a Certificate Authority database populated with the server's self signed certificate.
        // Since the test certifcate's credentials are unlikely to match this host's name, downgrade the verification
        // from VERIFY_PEER_NAME to VERIFY_PEER.
        connection_options client_opts;
        ssl_client_options ssl_cli(platform_CA("tserver"), proton::ssl::VERIFY_PEER);
        client_opts.ssl_client_options(ssl_cli);
        c.client_connection_options(client_opts);

        s_handler.acceptor = c.listen(url);
        c.open_sender(url);
    }
Beispiel #4
0
    void on_container_start(proton::event &e, proton::container &c) override {
        // Configure listener.  Details vary by platform.
        ssl_certificate server_cert = platform_certificate("tserver", "tserverpw");
        std::string client_CA = platform_CA("tclient");
        // Specify an SSL domain with CA's for client certificate verification.
        ssl_server_options srv_ssl(server_cert, client_CA);
        connection_options server_opts;
        server_opts.ssl_server_options(srv_ssl).handler(&s_handler);
        server_opts.sasl_allowed_mechs("EXTERNAL");
        c.server_connection_options(server_opts);

        // Configure client.
        ssl_certificate client_cert = platform_certificate("tclient", "tclientpw");
        std::string server_CA = platform_CA("tserver");
        // Since the test certifcate's credentials are unlikely to match this host's name, downgrade the verification
        // from VERIFY_PEER_NAME to VERIFY_PEER.
        ssl_client_options ssl_cli(client_cert, server_CA, proton::ssl::VERIFY_PEER);
        connection_options client_opts;
        client_opts.ssl_client_options(ssl_cli).sasl_allowed_mechs("EXTERNAL");
        c.client_connection_options(client_opts);

        s_handler.inbound_listener = c.listen(url);
        c.open_sender(url);
    }
Beispiel #5
0
 void on_container_start(proton::container &c) override {
     proton::source_options opts;
     set_filter(opts, "colour = 'green'");
     proton::connection conn = c.connect(url);
     conn.open_receiver(url.path(), proton::receiver_options().source(opts));
 }
Beispiel #6
0
 void on_container_start(proton::container &c) override {
     c.listen(url);
     std::cout << "server listening on " << url << std::endl;
 }
Beispiel #7
0
 void on_container_start(proton::event &e, proton::container &c) override {
     acceptor = c.listen(url);
     std::cout << "direct_send listening on " << url << std::endl;
 }
 sender(proton::container& cont, const std::string& url, const std::string& address)
     : work_queue_(0), queued_(0), credit_(0)
 {
     cont.open_sender(url+"/"+address, proton::connection_options().handler(*this));
 }
 void on_container_start(proton::container &c) override {
     // Connection options for this connection.  Merged with and overriding the container's
     // client_connection_options() settings.
     c.connect(url, connection_options().handler(&conn_handler).max_frame_size(2468));
 }
Beispiel #10
0
 void on_container_start(proton::event &e, proton::container &c) override {
     sender = c.open_sender(url);
     // Create a receiver with a dynamically chosen unique address.
     receiver = sender.connection().open_receiver("", proton::link_options().dynamic_address(true));
 }
Beispiel #11
0
 void on_container_start(proton::container &c) override {
     c.receiver_options(proton::receiver_options().credit_window(1024));
     c.open_sender(url_);
 }
Beispiel #12
0
 void on_container_start(proton::event &e, proton::container &c) override {
     c.listen(url_);
     std::cout << "broker listening on " << url_ << std::endl;
 }