void on_start(proton::event &e) {
        // 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.
        server_domain sdomain(server_cert, client_CA);
        connection_options server_opts;
        server_opts.server_domain(sdomain).handler(&s_handler);
        server_opts.allowed_mechs("EXTERNAL");
        e.container().server_connection_options(server_opts);

        // Configure client.
        ssl_certificate client_cert = platform_certificate("tclient", "tclientpw");
        std::string server_CA = platform_CA("tserver");
        client_domain cdomain(client_cert, server_CA);
        connection_options client_opts;
        client_opts.client_domain(cdomain).allowed_mechs("EXTERNAL");
        // Validate the server certificate against this name:
        client_opts.peer_hostname("test_server");
        e.container().client_connection_options(client_opts);

        s_handler.inbound_listener = e.container().listen(url);
        e.container().open_sender(url);
    }
Example #2
0
 void on_start(proton::event &e) {
     e.container().listen(url_);
     std::cout << "broker listening on " << url_ << std::endl;
 }
 void on_start(proton::event &e) {
     acceptor = e.container().listen(url);
     std::cout << "direct_recv listening on " << url << std::endl;
 }
Example #4
0
 void on_start(proton::event &e) {
     e.container().open_sender(url_);
     reactor_ = e.container().reactor();
 }
Example #5
0
 void 
 on_start(proton::event &e) 
 {
   log ( "on_start listening on |%s|", url.str().c_str() );
   receiver = e.container().open_receiver(url);
 }
Example #6
0
    void on_start(proton::event &e) {
        connection = e.container().connect(url);
        connection.open_receiver(url.path());

        std::cout << "server connected to " << url << std::endl;
    }
Example #7
0
 void on_start(proton::event &e) {
     acceptor = e.container().listen(url).ptr();
     e.container().create_sender(url);
 }
Example #8
0
 void on_start(proton::event &e) {
     sender = e.container().open_sender(url);
 }
Example #9
0
 void on_start(proton::event &e) {
     sender = e.container().open_sender(url);
     // Create a receiver with a dynamically chosen unique address.
     receiver = sender.connection().open_receiver("", proton::link_options().dynamic_address(true));
 }
Example #10
0
 void on_start(proton::event &e) {
     sender = e.container().create_sender(url).ptr();
     // Create a receiver with a dynamically chosen unique address.
     receiver = sender->connection().create_receiver("", true/*dynamic*/).ptr();
 }
Example #11
0
 void on_start(proton::event &e) {
     proton::connection conn = e.container().connect(url);
     conn.open_receiver(url.path());
     conn.open_sender(url.path());
 }
 void on_start(proton::event &e) {
     // Connection options for this connection.  Merged with and overriding the container's
     // client_connection_options() settings.
     e.container().connect(url, connection_options().handler(&conn_handler).max_frame_size(2468));
 }