From 5657dca25451cfb63a90a3908db0c464fe3f343d Mon Sep 17 00:00:00 2001
From: lichao <lichao@aiotlink.com>
Date: 星期一, 29 三月 2021 14:16:49 +0800
Subject: [PATCH] add protobuf; refactor.

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

diff --git a/src/msg.h b/src/msg.h
index 2c2efac..99fb2e2 100644
--- a/src/msg.h
+++ b/src/msg.h
@@ -22,8 +22,11 @@
 #include "shm.h"
 #include <boost/interprocess/offset_ptr.hpp>
 #include <boost/uuid/uuid_generators.hpp>
+#include "bhome_msg.pb.h"
 
-namespace bhome_shm {
+namespace bhome_msg {
+    using namespace bhome_shm;
+    using namespace bhome::msg; // for serialized data in Msg
 
 // msg is safe to be stored in shared memory, so POD data or offset_ptr is required.
 // message format: header(meta) + body(data).
@@ -83,7 +86,7 @@
 inline void swap(Msg &m1, Msg &m2) { m1.swap(m2); }
 
 
-} // namespace bhome_shm
+} // namespace bhome_msg
 
 
 

--
Gitblit v1.8.0