summaryrefslogtreecommitdiff
path: root/TAO/tests/NestedUpcall/Simple/client_i.cpp
blob: 58aed897da20c3b9a6408e32176808bca3272233 (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
// $Id$

#include "client_i.h"

client_i::client_i (int quiet,
                    server_ptr s)
  : quiet_ (quiet),
    server_ (server::_duplicate (s))
{
}

void
client_i::ping (CORBA::UShort time_to_live,
                CORBA::Environment &ACE_TRY_ENV)
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  if (!this->quiet_)
    ACE_DEBUG ((LM_DEBUG,
                "(%t) client_i::ping -> time to live = %d\n",
                time_to_live));

  --time_to_live;

  if (time_to_live > 0)
    {
      this->server_->ping (time_to_live,
                           ACE_TRY_ENV);
      ACE_CHECK;
    }
}