summaryrefslogtreecommitdiffstats
path: root/src/rpc-server/src/trex_rpc_req_resp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpc-server/src/trex_rpc_req_resp.cpp')
-rw-r--r--src/rpc-server/src/trex_rpc_req_resp.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rpc-server/src/trex_rpc_req_resp.cpp b/src/rpc-server/src/trex_rpc_req_resp.cpp
index e533c4f2..2d8f12fa 100644
--- a/src/rpc-server/src/trex_rpc_req_resp.cpp
+++ b/src/rpc-server/src/trex_rpc_req_resp.cpp
@@ -31,7 +31,7 @@ limitations under the License.
#include <json/json.h>
-TrexRpcServerReqRes::TrexRpcServerReqRes(TrexRpcServerArray::protocol_type_e protocol, uint16_t port) : TrexRpcServerInterface(protocol, port) {
+TrexRpcServerReqRes::TrexRpcServerReqRes(const TrexRpcServerConfig &cfg) : TrexRpcServerInterface(cfg) {
/* ZMQ is not thread safe - this should be outside */
m_context = zmq_ctx_new();
}
@@ -42,15 +42,15 @@ void TrexRpcServerReqRes::_rpc_thread_cb() {
// Socket to talk to clients
m_socket = zmq_socket (m_context, ZMQ_REP);
- switch (m_protocol) {
- case TrexRpcServerArray::RPC_PROT_TCP:
+ switch (m_cfg.get_protocol()) {
+ case TrexRpcServerConfig::RPC_PROT_TCP:
ss << "tcp://*:";
break;
default:
throw TrexRpcException("unknown protocol for RPC");
}
- ss << m_port;
+ ss << m_cfg.get_port();
int rc = zmq_bind (m_socket, ss.str().c_str());
if (rc != 0) {