Changeset 4934 for source/ariba/utility/bootstrap/modules/periodicbroadcast
- Timestamp:
- Jul 15, 2009, 2:13:02 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/utility/bootstrap/modules/periodicbroadcast/PeriodicBroadcast.cpp
r4924 r4934 67 67 server(io_service, &newRemoteServices, &newRemoteServicesMutex) { 68 68 69 } 70 71 PeriodicBroadcast::~PeriodicBroadcast(){ 72 } 73 74 void PeriodicBroadcast::threadFunc(PeriodicBroadcast* obj){ 75 obj->io_service.run(); 76 } 77 78 string PeriodicBroadcast::getName(){ 79 return "PeriodicBroadcast"; 80 } 81 82 string PeriodicBroadcast::getInformation(){ 83 return "periodic broadcasting of service information"; 84 } 85 86 bool PeriodicBroadcast::isFunctional(){ 87 return true; 88 } 89 90 void PeriodicBroadcast::start(){ 69 91 io_service_thread = new boost::thread( 70 boost::bind(&PeriodicBroadcast::threadFunc, this) ); 71 } 72 73 PeriodicBroadcast::~PeriodicBroadcast(){ 92 boost::bind(&PeriodicBroadcast::threadFunc, this) ); 93 94 Timer::setInterval( timerinterval ); 95 Timer::start(); 96 } 97 98 void PeriodicBroadcast::stop(){ 74 99 io_service.stop(); 75 100 io_service_thread->join(); 76 101 delete io_service_thread; 77 102 io_service_thread = NULL; 78 } 79 80 void PeriodicBroadcast::threadFunc(PeriodicBroadcast* obj){ 81 obj->io_service.run(); 82 } 83 84 string PeriodicBroadcast::getName(){ 85 return "PeriodicBroadcast"; 86 } 87 88 string PeriodicBroadcast::getInformation(){ 89 return "periodic broadcasting of service information"; 90 } 91 92 bool PeriodicBroadcast::isFunctional(){ 93 return true; 94 } 95 96 void PeriodicBroadcast::start(){ 97 Timer::setInterval( timerinterval ); 98 Timer::start(); 99 } 100 101 void PeriodicBroadcast::stop(){ 103 102 104 Timer::stop(); 103 105
Note:
See TracChangeset
for help on using the changeset viewer.