summaryrefslogtreecommitdiffstats
path: root/src/rpc-server/trex_rpc_server_api.h
diff options
context:
space:
mode:
authorDan Klein <danklei@cisco.com>2015-10-22 05:31:22 +0300
committerDan Klein <danklei@cisco.com>2015-10-22 05:31:22 +0300
commitf5c4a8051d697c086eb0d1c8ce3ac90ab245d249 (patch)
treefb0d379947c4b1984b77f6594d27f96d72c3cba0 /src/rpc-server/trex_rpc_server_api.h
parent508703e11a3fad3e44535c5433f803d77f28e245 (diff)
parent876c76572fdb2fb8f0e8db21bc420d284dc05950 (diff)
Merge branch 'master' into dan_stateless
Diffstat (limited to 'src/rpc-server/trex_rpc_server_api.h')
-rw-r--r--src/rpc-server/trex_rpc_server_api.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/rpc-server/trex_rpc_server_api.h b/src/rpc-server/trex_rpc_server_api.h
index 06bbe10c..ff876ac4 100644
--- a/src/rpc-server/trex_rpc_server_api.h
+++ b/src/rpc-server/trex_rpc_server_api.h
@@ -24,6 +24,7 @@ limitations under the License.
#include <stdint.h>
#include <vector>
+#include <mutex>
#include <thread>
#include <string>
#include <stdexcept>
@@ -68,7 +69,7 @@ private:
class TrexRpcServerInterface {
public:
- TrexRpcServerInterface(const TrexRpcServerConfig &cfg, const std::string &name);
+ TrexRpcServerInterface(const TrexRpcServerConfig &cfg, const std::string &name, std::mutex *m_lock = NULL);
virtual ~TrexRpcServerInterface();
/**
@@ -127,6 +128,7 @@ protected:
bool m_is_verbose;
std::thread *m_thread;
std::string m_name;
+ std::mutex *m_lock;
};
/**
@@ -139,8 +141,11 @@ protected:
class TrexRpcServer {
public:
- /* currently only request response server config is required */
- TrexRpcServer(const TrexRpcServerConfig &req_resp_cfg);
+ /* creates the collection of servers using configurations */
+ TrexRpcServer(const TrexRpcServerConfig *req_resp_cfg,
+ const TrexRpcServerConfig *async_cfg,
+ std::mutex *m_lock = NULL);
+
~TrexRpcServer();
/**