Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / Big_Twoways / Peer.cpp
blob33fe93ec561b86ee686bf4ef1192821c13d4f18d
1 #include "Peer.h"
2 #include "Session.h"
4 Peer::Peer (CORBA::ORB_ptr orb)
5 : orb_ (CORBA::ORB::_duplicate (orb))
9 Peer::~Peer (void)
13 Test::Session_ptr
14 Peer::create_session (Test::Session_Control_ptr control,
15 CORBA::ULong payload_size,
16 CORBA::ULong thread_count,
17 CORBA::ULong message_count,
18 CORBA::ULong peer_count)
20 Session *session_impl = 0;
21 ACE_NEW_THROW_EX (session_impl,
22 Session (control,
23 payload_size,
24 thread_count,
25 message_count,
26 peer_count),
27 CORBA::NO_MEMORY ());
28 PortableServer::ServantBase_var transfer_ownership (session_impl);
30 return session_impl->_this ();
33 void
34 Peer::shutdown (void)
36 ACE_DEBUG ((LM_DEBUG,
37 "(%P|%t) Peer::shutdown, waiting for threads\n"));
39 ACE_DEBUG ((LM_DEBUG,
40 "(%P|%t) Peer::shutdown, shutting down ORB\n"));
41 this->orb_->shutdown (0);