From 64bff0caaf665c65125cdab2b144f3594d520002 Mon Sep 17 00:00:00 2001
From: lichao <lichao@aiotlink.com>
Date: 星期二, 20 四月 2021 18:39:52 +0800
Subject: [PATCH] go api works. refactor.
---
box/center.cpp | 11 ++---------
1 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/box/center.cpp b/box/center.cpp
index e8d014e..3059e90 100644
--- a/box/center.cpp
+++ b/box/center.cpp
@@ -27,7 +27,6 @@
using namespace bhome_shm;
using namespace bhome_msg;
-using namespace bhome::msg;
typedef BHCenter::MsgHandler Handler;
namespace
@@ -39,7 +38,7 @@
public:
typedef std::string ProcId;
typedef std::string Address;
- typedef bhome::msg::ProcInfo ProcInfo;
+ typedef bhome_msg::ProcInfo ProcInfo;
typedef std::function<void(Address const &)> Cleaner;
private:
@@ -396,7 +395,7 @@
Handler Combine(const Handler &h1, const Handler &h2)
{
- return [h1, h2](ShmSocket &socket, bhome_msg::MsgI &msg, bhome::msg::BHMsgHead &head) {
+ return [h1, h2](ShmSocket &socket, bhome_msg::MsgI &msg, bhome_msg::BHMsgHead &head) {
return h1(socket, msg, head) || h2(socket, msg, head);
};
}
@@ -490,12 +489,6 @@
#undef CASE_ON_MSG_TYPE
} // namespace
-
-SharedMemory &BHomeShm()
-{
- static SharedMemory shm("bhome_default_shm_v0", 1024 * 1024 * 512);
- return shm;
-}
BHCenter::CenterRecords &BHCenter::Centers()
{
--
Gitblit v1.8.0