From 491d98b3ba32cafed5682552bd870ca0ef93275c Mon Sep 17 00:00:00 2001
From: lichao <lichao@aiotlink.com>
Date: 星期二, 30 三月 2021 18:29:09 +0800
Subject: [PATCH] add ShmSocket as shm interface, add sub/pub.

---
 src/shm_queue.h |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/shm_queue.h b/src/shm_queue.h
index a536553..60b1862 100644
--- a/src/shm_queue.h
+++ b/src/shm_queue.h
@@ -120,7 +120,10 @@
     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);
-    bool Send(const MQId &remote_id, const MsgI &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