| | |
| | | return Heartbeat(proc, reply_body, timeout_ms); |
| | | } |
| | | |
| | | bool TopicNode::QueryTopicAddress(MsgQueryTopic &query, MsgQueryTopicReply &reply_body, const int timeout_ms) |
| | | bool TopicNode::QueryTopicAddress(BHAddress &dest, MsgQueryTopic &query, MsgQueryTopicReply &reply_body, const int timeout_ms) |
| | | { |
| | | if (!IsOnline()) { |
| | | SetLastError(eNotRegistered, "Not Registered."); |
| | |
| | | MsgQueryTopic query; |
| | | query.set_topic(topic); |
| | | MsgQueryTopicReply rep; |
| | | if (QueryTopicAddress(query, rep, timeout_ms)) { |
| | | BHAddress dest; // empty means local. |
| | | if (QueryTopicAddress(dest, query, rep, timeout_ms)) { |
| | | auto &ls = rep.node_address(); |
| | | n = ls.size(); |
| | | for (auto &na : ls) { |