cout << "Find SupplierAdmin" << endl;
// find ProxyPullConsumer under this SupplierAdmin
CosEventChannelAdmin::ProxyPullConsumer_var proxy_consumer;
proxy_consumer = supplier_admin->obtain_pull_consumer ();
// create PullSupplier
Supplier_i* supplier = new Supplier_i ();
CosEventComm::PullSupplier_var supplierRef = supplier->_this();
// Connect PullSupplier with ProxyPullConsumer
proxy_consumer->connect_pull_supplier(supplierRef.in());
cout << "Connect Pull Supplier." << endl;
orb->run();
文章来源于领测软件测试网 https://www.ltesting.net/