本文整理汇总了C++中proton::event::container方法的典型用法代码示例。如果您正苦于以下问题:C++ event::container方法的具体用法?C++ event::container怎么用?C++ event::container使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类proton::event
的用法示例。
在下文中一共展示了event::container方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: on_start
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);
}
示例2: on_start
void on_start(proton::event &e) {
e.container().listen(url_);
std::cout << "broker listening on " << url_ << std::endl;
}
示例3: on_start
void on_start(proton::event &e) {
acceptor = e.container().listen(url);
std::cout << "direct_recv listening on " << url << std::endl;
}
示例4: on_start
void on_start(proton::event &e) {
e.container().open_sender(url_);
reactor_ = e.container().reactor();
}
示例5: log
void
on_start(proton::event &e)
{
log ( "on_start listening on |%s|", url.str().c_str() );
receiver = e.container().open_receiver(url);
}
示例6: on_start
void on_start(proton::event &e) {
connection = e.container().connect(url);
connection.open_receiver(url.path());
std::cout << "server connected to " << url << std::endl;
}
示例7: on_start
void on_start(proton::event &e) {
acceptor = e.container().listen(url).ptr();
e.container().create_sender(url);
}
示例8: on_start
void on_start(proton::event &e) {
sender = e.container().open_sender(url);
}
示例9: on_start
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));
}
示例10: on_start
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();
}
示例11: on_start
void on_start(proton::event &e) {
proton::connection conn = e.container().connect(url);
conn.open_receiver(url.path());
conn.open_sender(url.path());
}
示例12: on_start
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));
}