| | |
| | | #define SOCKET_GWTJHBPO |
| | | |
| | | #include "shm_queue.h" |
| | | #include <vector> |
| | | #include <thread> |
| | | #include <memory> |
| | | #include <functional> |
| | | #include <mutex> |
| | | #include <condition_variable> |
| | | #include <atomic> |
| | | #include <condition_variable> |
| | | #include <functional> |
| | | #include <memory> |
| | | #include <mutex> |
| | | #include <thread> |
| | | #include <vector> |
| | | |
| | | class ShmSocket |
| | | { |
| | | typedef bhome_shm::ShmMsgQueue Queue; |
| | | |
| | | public: |
| | | enum Type { |
| | | eSockRequest, |
| | |
| | | bool Subscribe(const std::vector<std::string> &topics, const int timeout_ms); |
| | | bool RecvSub(std::string &topic, std::string &data, const int timeout_ms); |
| | | bool SetRecvCallback(const RecvCB &onRecv); |
| | | |
| | | private: |
| | | bool HasRecvCB(); |
| | | void Stop(); |
| | |
| | | |
| | | std::unique_ptr<Queue> mq_; |
| | | }; |
| | | |
| | | |
| | | #endif // end of include guard: SOCKET_GWTJHBPO |