| | |
| | | for (auto &p : sockets_) { p->Stop(); } |
| | | } |
| | | |
| | | bool TopicNode::Register(ProcInfo &proc, MsgCommonReply &reply_body, const int timeout_ms) |
| | | bool TopicNode::UniRegister(const bool internal, ProcInfo &proc, MsgCommonReply &reply_body, const int timeout_ms) |
| | | { |
| | | auto ValidUserProcId = [](const std::string &id) { return !id.empty() && id[0] != '#'; }; |
| | | if (!internal && !ValidUserProcId(proc.proc_id())) { |
| | | SetLastError(eInvalidInput, "invalid proc id :'" + proc.proc_id() + "'"); |
| | | return false; |
| | | } |
| | | |
| | | { |
| | | std::lock_guard<std::mutex> lk(mutex_); |
| | | info_ = proc; |