2 * @file Server_Peer.cpp
4 * @author Carlos O'Ryan <coryan@atdesk.com>
6 #include "Server_Peer.h"
9 Server_Peer::Server_Peer (unsigned int seed
,
11 CORBA::ULong payload_size
)
13 , orb_ (CORBA::ORB::_duplicate(orb
))
14 , payload_size_ (payload_size
)
19 Server_Peer::callme(Test::Peer_ptr callback
,
20 CORBA::ULong max_depth
,
21 Test::Payload
const &)
23 int r
= ACE_OS::rand_r(&this->seed_
) % 50;
28 "(%P|%t) Server_Peer::callme[%d], r = %d\n",
38 catch (const CORBA::Exception
&)
42 // orb_->shutdown (false);
44 else if (max_depth
> 0)
46 Test::Peer_var me
= this->_this ();
48 Test::Payload
extra_data(this->payload_size_
);
49 extra_data
.length(this->payload_size_
);
50 callback
->callme(me
.in(),
59 throw CORBA::NO_IMPLEMENT ();