|
40 | 40 |
|
41 | 41 | zqrpc::RpcServer::RpcServer(zmq::context_t* context,const char* suffix) :
|
42 | 42 | context_(context),
|
43 |
| - use_inproc_workil( std::string(ZQRPC_INPROC_WORKIL)+std::string(suffix) ), |
44 |
| - use_inproc_worker( std::string(ZQRPC_INPROC_WORKER)+std::string(suffix) ), |
45 |
| - use_inproc_pcontrol( std::string(ZQRPC_INPROC_PCONTROL)+std::string(suffix) ), |
| 43 | + suffix_(suffix), |
| 44 | + use_inproc_workil( std::string(ZQRPC_INPROC_WORKIL)+std::string(suffix_) ), |
| 45 | + use_inproc_worker( std::string(ZQRPC_INPROC_WORKER)+std::string(suffix_) ), |
| 46 | + use_inproc_pcontrol( std::string(ZQRPC_INPROC_PCONTROL)+std::string(suffix_) ), |
46 | 47 | rpc_frontend_(context_,ZMQ_ROUTER,"ROUTER"),
|
47 | 48 | rpc_backend_(context_,ZMQ_DEALER,"DEALER"),
|
48 | 49 | rpc_control_(context_,ZMQ_DEALER,"CONTROL"),
|
@@ -95,11 +96,15 @@ void zqrpc::RpcServer::Start(std::size_t noof_threads)
|
95 | 96 | rpc_frontend_.bind(it->c_str());
|
96 | 97 | }
|
97 | 98 | rpc_frontend_.bind(use_inproc_workil.c_str());
|
| 99 | + DLOG(INFO) << "Bound " << use_inproc_workil.c_str() << std::endl; |
98 | 100 | rpc_backend_.bind(use_inproc_worker.c_str());
|
| 101 | + DLOG(INFO) << "Bound " << use_inproc_worker.c_str() << std::endl; |
99 | 102 | rpc_control_.bind(use_inproc_pcontrol.c_str());
|
| 103 | + DLOG(INFO) << "Bound " << use_inproc_pcontrol.c_str() << std::endl; |
| 104 | + |
100 | 105 | started_=true;
|
101 | 106 | for(std::size_t i = 0; i < noof_threads; ++i) {
|
102 |
| - threads_.push_back( new boost::thread(zqrpc::RpcWorker(context_, rpc_method_map_)) ); |
| 107 | + threads_.push_back( new boost::thread(zqrpc::RpcWorker(context_, rpc_method_map_,suffix_)) ); |
103 | 108 | }
|
104 | 109 | ProxyStart();
|
105 | 110 | DLOG(INFO) << "Loop Ended " << std::endl;
|
|
0 commit comments