From 65ef4d68321e56906920be75831b5e968f7abd7b Mon Sep 17 00:00:00 2001
From: lichao <lichao@aiotlink.com>
Date: 星期二, 13 四月 2021 09:34:05 +0800
Subject: [PATCH] add heartbeat; refactor.

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

diff --git a/src/topic_node.h b/src/topic_node.h
index 60497ad..d2cdcf9 100644
--- a/src/topic_node.h
+++ b/src/topic_node.h
@@ -37,9 +37,12 @@
 	TopicNode(SharedMemory &shm);
 	~TopicNode();
 
-	void StopAll();
+	void Start();
+	void Stop();
 	// topic node
-	bool Register(ProcInfo &body, MsgCommonReply &reply, const int timeout_ms);
+	bool Register(ProcInfo &proc, MsgCommonReply &reply_body, const int timeout_ms);
+	bool Heartbeat(ProcInfo &proc, MsgCommonReply &reply_body, const int timeout_ms);
+	bool Heartbeat(const int timeout_ms);
 
 	// topic rpc server
 	typedef std::function<bool(const std::string &topic, const std::string &data, std::string &reply)> OnRequest;

--
Gitblit v1.8.0