blob: 600a382a66591d232cb6e1570702ca03696529a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
// $Id$
#include "test_i.h"
#include "ace/OS_NS_unistd.h"
#include "ace/High_Res_Timer.h"
ACE_RCSID(Timeout, test_i, "$Id$")
ACE_High_Res_Timer sleep_duration;
Simple_Server_i::Simple_Server_i (CORBA::ORB_ptr orb)
: orb_ (CORBA::ORB::_duplicate (orb))
, echo_count_ (0)
{
sleep_duration.calibrate();
}
void
Simple_Server_i::echo (CORBA::Long x,
CORBA::Long msecs, const char* msg)
ACE_THROW_SPEC ((CORBA::SystemException))
{
ACE_Time_Value tv;
tv.msec (msecs);
echo_count_++;
ACE_OS::sleep (tv);
}
void
Simple_Server_i::shutdown (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
ACE_DEBUG ((LM_DEBUG,
"server (%P) Received shutdown request from client\n"));
this->orb_->shutdown (0);
}
|