24 int main(
int argc,
const char *argv[])
36 JParser<> zap(
"Auxiliary program to receive messages from ControlHost server.");
49 catch(
const exception &error) {
50 FATAL(error.what() << endl);
54 if (tagList.empty() && TagList.empty()) {
55 FATAL(
"No tags specified.");
60 JControlHost::Throw(
true);
64 JControlHost in(hostname);
67 JSubscriptionList buffer;
70 buffer.add(JSubscriptionAny(*i));
74 buffer.add(JSubscriptionAll(*i));
85 for (
const string stop(
"stop"); buffer.size() != stop.size() || string(buffer.data(), stop.size()) != stop; ) {
89 buffer.resize(prefix.getSize());
91 in.GetFullData(buffer.data(), buffer.size());
97 cout << left << setw(8) << prefix.getTag() <<
' ' << right << setw(8) << prefix.getSize();
99 if (TagList.find(prefix) != TagList.end()) {
100 cout <<
' ' << string(buffer.data(), buffer.size());
106 catch(
const JControlHostException& error) {
107 ERROR(error << endl);