From cab831748a2a9cc18b7f18f3b5e14a4374b7ab68 Mon Sep 17 00:00:00 2001
From: lichao <lichao@aiotlink.com>
Date: 星期一, 17 五月 2021 18:34:26 +0800
Subject: [PATCH] socket send using abs addr, avoid shm find by id.

---
 src/shm_msg_queue.h |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/shm_msg_queue.h b/src/shm_msg_queue.h
index eead739..de60fde 100644
--- a/src/shm_msg_queue.h
+++ b/src/shm_msg_queue.h
@@ -18,6 +18,7 @@
 #ifndef SHM_MSG_QUEUE_D847TQXH
 #define SHM_MSG_QUEUE_D847TQXH
 
+#include "defs.h"
 #include "msg.h"
 #include "shm_queue.h"
 
@@ -75,8 +76,8 @@
 	bool Recv(MsgI &msg, const int timeout_ms) { return Recv(msg.OffsetRef(), timeout_ms); }
 	bool TryRecv(MsgI &msg) { return TryRecv(msg.OffsetRef()); }
 	static Queue *Find(ShmType &shm, const MQId remote);
-	static bool TrySend(ShmType &shm, const MQId remote, const RawData val);
-	bool TrySend(const MQId remote, const RawData val) { return TrySend(shm(), remote, val); }
+	static bool TrySend(ShmType &shm, const MQInfo &remote, const RawData val);
+	bool TrySend(const MQInfo &remote, const RawData val) { return TrySend(shm(), remote, val); }
 
 private:
 #ifndef BH_USE_ATOMIC_Q

--
Gitblit v1.8.0