lichao
2021-05-21 330f78f3334bcdcdb4cc2ab2dbf66604e0224d71
src/topic_node.h
@@ -19,7 +19,7 @@
#define TOPIC_NODE_YVKWA6TF
#include "msg.h"
#include "socket.h"
#include "shm_socket.h"
#include <atomic>
#include <memory>
#include <mutex>
@@ -34,14 +34,17 @@
   SharedMemory &shm_;
   ProcInfo info_;
   SharedMemory &shm() { return shm_; }
   SharedMemory &shm() const { return shm_; }
   const MQInfo &CenterAddr() const { return BHTopicCenterAddress(shm()); }
   const MQInfo &BusAddr() const { return BHTopicBusAddress(shm()); }
public:
   TopicNode(SharedMemory &shm);
   ~TopicNode();
   // topic node
   bool Register(ProcInfo &proc, MsgCommonReply &reply_body, const int timeout_ms);
   bool Register(ProcInfo &proc, MsgCommonReply &reply_body, const int timeout_ms) { return UniRegister(false, proc, reply_body, timeout_ms); }
   bool UniRegister(const bool internal, ProcInfo &proc, MsgCommonReply &reply_body, const int timeout_ms);
   bool Unregister(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);