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    : Simulator.cpp,v 1.4 2006/03/16 15:56:39 sjiang Exp
00004 
00005 #include "Simulator.h"
00006 
00007 namespace ACE_RMCast
00008 {
00009   Simulator::
00010   Simulator ()
00011   {
00012     srand (time (0));
00013   }
00014 
00015   void Simulator::
00016   send (Message_ptr m)
00017   {
00018     // Note: Simulator may work in unpredictable ways mainly due
00019     // to the "reliable loopback" mechanism.
00020     //
00021     out_->send (m);
00022     return;
00023 
00024     /*int r (rand ());
00025 
00026     if ((r % 3) == 0) return;
00027 
00028     Lock l (mutex_);
00029 
00030     if (hold_.get ())
00031     {
00032       out_->send (m);
00033       out_->send (hold_);
00034     }
00035     else
00036     {
00037       hold_ = m;
00038     }*/
00039   }
00040 }

Generated on Thu Nov 9 11:40:41 2006 for ACE_RMCast by doxygen 1.3.6