| Line |  | 
|---|
| 1 | #include <string> | 
|---|
| 2 | #include "ariba/utility/system/StartupWrapper.h" | 
|---|
| 3 | #include "PingPong.h" | 
|---|
| 4 |  | 
|---|
| 5 | using std::string; | 
|---|
| 6 | using ariba::utility::StartupWrapper; | 
|---|
| 7 | using ariba::application::pingpong::PingPong; | 
|---|
| 8 |  | 
|---|
| 9 | #include "ariba/utility/bootstrap/BootstrapManager.h" | 
|---|
| 10 | using ariba::utility::BootstrapManager; | 
|---|
| 11 |  | 
|---|
| 12 | int main( int argc, char** argv ) { | 
|---|
| 13 |  | 
|---|
| 14 |  | 
|---|
| 15 | StartupWrapper::startSystem(); | 
|---|
| 16 | BootstrapManager::instance().registerModule( | 
|---|
| 17 | BootstrapManager::BootstrapTypeMulticastDns); | 
|---|
| 18 | BootstrapManager::instance().publish("testname", "testinfo"); | 
|---|
| 19 | getchar(); | 
|---|
| 20 | StartupWrapper::stopSystem(); | 
|---|
| 21 | return 0; | 
|---|
| 22 |  | 
|---|
| 23 |  | 
|---|
| 24 |  | 
|---|
| 25 | // get config file | 
|---|
| 26 | string config = "../etc/settings.cnf"; | 
|---|
| 27 | if (argc >= 2) config = argv[1]; | 
|---|
| 28 |  | 
|---|
| 29 | StartupWrapper::initConfig( config ); | 
|---|
| 30 | StartupWrapper::startSystem(); | 
|---|
| 31 |  | 
|---|
| 32 | // this will do the main functionality and block | 
|---|
| 33 | PingPong ping; | 
|---|
| 34 | StartupWrapper::startup(&ping); | 
|---|
| 35 |  | 
|---|
| 36 | // --> we will run blocking until <enter> is hit | 
|---|
| 37 |  | 
|---|
| 38 | StartupWrapper::shutdown(&ping); | 
|---|
| 39 | StartupWrapper::stopSystem(); | 
|---|
| 40 |  | 
|---|
| 41 | return 0; | 
|---|
| 42 | } | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.