From f01bc7136299ace3ea085c4381bbfecc4b395aed Mon Sep 17 00:00:00 2001 From: lichao <lichao@aiotlink.com> Date: 星期三, 31 三月 2021 10:36:15 +0800 Subject: [PATCH] add vscode .clang-format rule file. --- src/shm_queue.h | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/shm_queue.h b/src/shm_queue.h index 9d08016..60b1862 100644 --- a/src/shm_queue.h +++ b/src/shm_queue.h @@ -115,11 +115,15 @@ ShmMsgQueue(const MQId &id, ShmType &segment, const int len); ShmMsgQueue(ShmType &segment, const int len); ~ShmMsgQueue(); - // bool Send(const MQId &remote_id, const void *data, const size_t size, const int timeout_ms); // request - bool Recv(BHMsg &msg, const int timeout_ms); - bool Send(const MQId &remote_id, const BHMsg &msg, const int timeout_ms); const MQId &Id() const { return id_; } - bool Send(const MQId &remote_id, const MsgI &msg, const int timeout_ms); + + bool Recv(BHMsg &msg, const int timeout_ms); + bool Recv(MsgI &msg, const int timeout_ms) { return Read(msg, timeout_ms); } + bool Send(const MQId &remote_id, const BHMsg &msg, const int timeout_ms); + static bool Send(SharedMemory &shm, const MQId &remote_id, const MsgI &msg, const int timeout_ms); + bool Send(const MQId &remote_id, const MsgI &msg, const int timeout_ms) { + return Send(shm(), remote_id, msg, timeout_ms); + } }; } // namespace bhome_shm -- Gitblit v1.8.0