| | |
| | | |
| | | void StopAll(); |
| | | // topic node |
| | | bool Register(const MsgRegister &body, MsgCommonReply &reply, const int timeout_ms); |
| | | bool RegisterRPC(const MsgRegisterRPC &body, MsgCommonReply &reply, const int timeout_ms); |
| | | bool Register(ProcInfo &body, MsgCommonReply &reply, const int timeout_ms); |
| | | |
| | | // topic rpc server |
| | | typedef std::function<bool(const std::string &topic, const std::string &data, std::string &reply)> OnRequest; |
| | | bool ServerStart(OnRequest const &cb, const int nworker = 2); |
| | | bool ServerRegisterRPC(MsgTopicList &topics, MsgCommonReply &reply, const int timeout_ms); |
| | | bool ServerRecvRequest(void *&src_info, std::string &topic, std::string &data, const int timeout_ms); |
| | | bool ServerSendReply(void *src_info, const std::string &data, const int timeout_ms); |
| | | |
| | |
| | | // subscribe |
| | | typedef std::function<void(const std::string &proc_id, const Topic &topic, const std::string &data)> TopicDataCB; |
| | | bool SubscribeStartWorker(const TopicDataCB &tdcb, int nworker = 2); |
| | | bool Subscribe(const std::vector<Topic> &topics, const int timeout_ms); |
| | | bool Subscribe(MsgTopicList &topics, const int timeout_ms); |
| | | bool RecvSub(std::string &proc_id, Topic &topic, std::string &data, const int timeout_ms); |
| | | |
| | | private: |