Simulator.cpp

Go to the documentation of this file.
00001 // file      : ace/RMCast/Simulator.cpp
00002 // author    : Boris Kolpackov <boris@kolpackov.net>
00003 // cvs-id    : $Id: Simulator.cpp 78774 2007-07-04 06:06:59Z sowayaa $
00004 
00005 #include "ace/OS_NS_time.h"
00006 #include "Simulator.h"
00007 
00008 namespace ACE_RMCast
00009 {
00010   Simulator::Simulator ()
00011   {
00012     ACE_OS::srand ((unsigned int)ACE_OS::time (0));
00013   }
00014 
00015   void Simulator::send (Message_ptr m)
00016   {
00017     // Note: Simulator may work in unpredictable ways mainly due
00018     // to the "reliable loopback" mechanism.
00019     //
00020     out_->send (m);
00021     return;
00022 
00023     /*int r (rand ());
00024 
00025     if ((r % 3) == 0) return;
00026 
00027     Lock l (mutex_);
00028 
00029     if (hold_.get ())
00030     {
00031       out_->send (m);
00032       out_->send (hold_);
00033     }
00034     else
00035     {
00036       hold_ = m;
00037     }*/
00038   }
00039 }

Generated on Sun Jan 27 13:02:56 2008 for ACE_RMCast by doxygen 1.3.6