| | |
| | | |
| | | #include "defs.h" |
| | | #include "socket.h" |
| | | #include <chrono> |
| | | #include <mutex> |
| | | #include <set> |
| | | |
| | | class ReqRepCenter |
| | | { |
| | |
| | | }; |
| | | Socket socket_; |
| | | ShmSocket::Shm &shm() { return socket_.shm(); } |
| | | struct ProcInfo { |
| | | std::string proc_id_; // unique name |
| | | std::string server_mqid_; |
| | | std::string ext_info_; // maybe json. |
| | | uint64_t timestamp_ = 0; |
| | | }; |
| | | |
| | | typedef std::string Dests; |
| | | |
| | | std::mutex mutex_; |
| | | std::unordered_map<std::string, Dests> topic_mq_; |
| | | std::unordered_map<std::string, ProcInfo> procs_; |
| | | |
| | | public: |
| | | ReqRepCenter(ShmSocket::Shm &shm) : |