/** * @file zeromq/ReqRep.h * @brief Request-reply proxy * @copyright 2015 Dual Inventive Technology Centre B.V. * * Request-reply proxy */ #ifndef INCLUDE_ZEROMQ_REQREP_H_ #define INCLUDE_ZEROMQ_REQREP_H_ #include #include #include #include class LogInterface; class ReqRep { public: /** * constructor for request reply * @param cfg config for the Request reply socket * @param l pointer to logging interface */ ReqRep(const std::shared_ptr &cfg, const std::shared_ptr &l); /** * destuctor for request reply */ ~ReqRep(); std::shared_ptr getInternalSocket(); void join(void); private: std::string __frontendBind; std::shared_ptr __proxyThread; std::shared_ptr __zmqFrontendContext; std::shared_ptr __zmqBackendContext; std::shared_ptr __deviceSocket; /**< device-facing socket */ std::shared_ptr __backendSocket; /**< server-facing socket (e.g. business-logic) */ std::shared_ptr __logSocket; std::deque> __workerQueue; void __run(void); }; #endif // INCLUDE_ZEROMQ_REQREP_H_