Merge pull request #2301 from sonndinh/remove-dup-reactor-functions
[ACE_TAO.git] / TAO / tests / Muxing / Receiver.cpp
blob630c1be966d9b174a4e43ef862ab8b350390cc96
1 #include "Receiver.h"
3 Receiver::Receiver (CORBA::ORB_ptr orb)
4 : message_count_ (0)
5 , byte_count_ (0)
6 , orb_ (CORBA::ORB::_duplicate (orb))
10 void
11 Receiver::dump_results ()
13 ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_);
14 ACE_DEBUG ((LM_DEBUG,
15 "Total messages = %d\n"
16 "Total bytes = %d\n",
17 this->message_count_,
18 this->byte_count_));
21 void
22 Receiver::receive_data (const Test::Payload &payload)
24 ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_);
25 this->message_count_++;
26 this->byte_count_ += payload.length ();
29 CORBA::Long
30 Receiver::get_event_count ()
32 ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->mutex_, 0);
33 return this->message_count_;
36 void
37 Receiver::shutdown ()
39 this->orb_->shutdown (false);