Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / Muxing / Receiver.cpp
blobe0cf3c1c60f6beb4591ff0e6425824e0140c84aa
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 (void)
32 ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->mutex_, 0);
33 return this->message_count_;
36 void
37 Receiver::shutdown (void)
39 this->orb_->shutdown (0);