FACT++  1.0
int main ( int  ,
const char **  argv 
)
Examples:
log.cc.

Definition at line 7 of file log.cc.

8 {
9  // We could use putenv to make the Configure class change the value...
10  setenv("DIM_DNS_NODE", "localhost", 0);
11 
12  // Get the name of the server we should subscribe to from the cmd line
13  const std::string server = argv[1] ? argv[1] : "TIME";
14 
15  // Some info on the console
16  std::cout << "Subscribing to " << server << "/MESSAGE...\n" << std::endl;
17 
18  // Create a message handler (default: redirects to stdout)
19  MessageImp msg;
20 
21  // Subscribe to SERVER/MESSAGE and start output
22  MessageDimRX msgrx(server, msg);
23 
24  // Just do nothing ;)
25  while (1)
26  usleep(1);
27 
28  return 0;
29 }
The base implementation of a distributed messaging system.
Definition: MessageImp.h:10
Based on MessageImp, subscribes to a MESSAGE service in the Dim network.
Definition: MessageDim.h:34