summaryrefslogtreecommitdiff
path: root/ACE/TAO/tests/Oneway_Send_Timeouts/Client.h
blob: 73ff2b8282f3266344f32b0fff5159a1dcf64024 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// $Id$

#ifndef _CLIENT_
#define _CLIENT_

#include "TestC.h"

#include "ace/Time_Value.h"

#include <string>

class Client
{
 public:
  Client (int argc, ACE_TCHAR* argv[]);
  ~Client ();

  bool run ();

 private:
  bool init (int argc, ACE_TCHAR* argv[]);
  bool parse_args (int argc, ACE_TCHAR* argv[]);

  enum Flushing_Strategy
  {
    LF,
    BLOCKING,
    REACTIVE
  };

  bool init_;
  bool one_way_test_;
  CORBA::ORB_var orb_;
  Test_var test_obj_;
  Test_var management_;
  Flushing_Strategy flush_strategy_;

  Test_var test_obj_none_timeout_;
  Test_var test_obj_eager_timeout_;
  Test_var test_obj_delayed_timeout_;
  Test_var test_obj_transport_timeout_;
  Test_var test_obj_server_timeout_;
  Test_var test_obj_target_timeout_;

  // flood up connection for 'tv' time.
  //  if tv is 0, remember to unsleep server.
  bool flood_connection (ACE_Time_Value& tv);
  bool unplug_transport ();
  bool test_oneway_timeout (bool flood);
};

#endif //_CLIENT_