| | |
| | | #include <string> |
| | | #include <unordered_map> |
| | | |
| | | namespace bhome_shm |
| | | { |
| | | class ShmMsgQueue; |
| | | } // namespace bhome_shm |
| | | |
| | | class SendQ |
| | | { |
| | |
| | | { |
| | | AppendData(addr, Data(std::move(content)), DefaultExpire(), onExpire); |
| | | } |
| | | bool TrySend(bhome_shm::ShmMsgQueue &mq); |
| | | bool TrySend(ShmMsgQueue &mq); |
| | | // bool empty() const { return store_.empty(); } |
| | | |
| | | private: |
| | |
| | | typedef std::list<Array> ArrayList; |
| | | typedef std::unordered_map<Remote, ArrayList> Store; |
| | | |
| | | int DoSend1Remote(bhome_shm::ShmMsgQueue &mq, const Remote remote, Array &arr); |
| | | int DoSend1Remote(bhome_shm::ShmMsgQueue &mq, const Remote remote, ArrayList &arr); |
| | | int DoSend1Remote(ShmMsgQueue &mq, const Remote remote, Array &arr); |
| | | int DoSend1Remote(ShmMsgQueue &mq, const Remote remote, ArrayList &arr); |
| | | |
| | | std::mutex mutex_in_; |
| | | std::mutex mutex_out_; |