Changeset 4934 for source/ariba


Ignore:
Timestamp:
Jul 15, 2009, 2:13:02 PM (15 years ago)
Author:
Christoph Mayer
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/utility/bootstrap/modules/periodicbroadcast/PeriodicBroadcast.cpp

    r4924 r4934  
    6767        server(io_service, &newRemoteServices, &newRemoteServicesMutex) {
    6868
     69}
     70
     71PeriodicBroadcast::~PeriodicBroadcast(){
     72}
     73
     74void PeriodicBroadcast::threadFunc(PeriodicBroadcast* obj){
     75        obj->io_service.run();
     76}
     77
     78string PeriodicBroadcast::getName(){
     79        return "PeriodicBroadcast";
     80}
     81
     82string PeriodicBroadcast::getInformation(){
     83        return "periodic broadcasting of service information";
     84}
     85
     86bool PeriodicBroadcast::isFunctional(){
     87        return true;
     88}
     89
     90void PeriodicBroadcast::start(){
    6991        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
     98void PeriodicBroadcast::stop(){
    7499        io_service.stop();
    75100        io_service_thread->join();
    76101        delete io_service_thread;
    77102        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
    102104        Timer::stop();
    103105
Note: See TracChangeset for help on using the changeset viewer.