14 typedef char_separator<char> separator;
15 const tokenizer<separator> tok(msg, separator(
"|"));
17 for (
auto it=tok.begin(); it!=tok.end(); it++)
19 const size_t p = it->find_first_of(
'@');
24 string server = it->substr(0, p);
31 fServerList.erase(server.substr(1));
32 CallbackServerRemove(server.substr(1));
38 server = server.substr(1);
42 if (fServerList.insert(server).second)
43 CallbackServerAdd(server);
66 typedef char_separator<char> separator;
67 const tokenizer<separator> tok(msg, separator(
"\n"));
69 for (
auto it=tok.begin(); it!=tok.end(); it++)
79 const size_t last_pipe = str.find_last_of(
'|');
82 const string type = str.substr(last_pipe+1);
90 const size_t first_pipe = str.find_first_of(
'|');
91 const size_t first_slash = str.find_first_of(
'/');
95 service.
server = str.substr(0, first_slash);
96 service.
name = str.substr(0, first_pipe);
97 service.
service = str.substr(first_slash+1, first_pipe-first_slash-1);
98 service.
format = str.substr(first_pipe +1, last_pipe -first_pipe -1);
99 service.
iscmd = type==
"CMD";
101 const auto v = find(fServiceList.begin(), fServiceList.end(), service.
name);
102 if (v!=fServiceList.end())
105 CallbackServiceAdd(service);
A general base-class describing events issues in a state machine.
std::string GetString() const
virtual Time GetTime() const
void HandlerServerImp(const EventImp &evt)
Warning because the service this data corrsponds to might have been last updated longer ago than Local time
void HandlerServiceListImp(const EventImp &evt)
virtual size_t GetSize() const