summaryrefslogtreecommitdiffstats
path: root/src/rpc-server/trex_rpc_server_api.h
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2015-10-19 16:30:55 +0300
committerHanoh Haim <hhaim@cisco.com>2015-10-19 16:30:55 +0300
commit872a205b4c5e4119b6d0d10a7ec774ce22d63256 (patch)
treee650ddcc3ceb5cb9e4b9c33609fcbfc956455f03 /src/rpc-server/trex_rpc_server_api.h
parentcf5dc18ecbeca6b4be9a171d996bba1cba9c3679 (diff)
parent6c7880b9881ed6690954f0c29259dd0b584b3970 (diff)
Merge branch 'rpc' -> add support for interactive mode
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();
/**