summaryrefslogtreecommitdiff
path: root/TAO/tao/Blocked_Connect_Strategy.cpp
blob: 9317a128679fc458e7280b9c36cdbce170fbe556 (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
53
54
55
56
57
58
#include "tao/Blocked_Connect_Strategy.h"
#include "tao/Connection_Handler.h"

#include "ace/Synch_Options.h"

ACE_RCSID(tao,
          Blocked_Connect_Strategy,
          "$Id$")

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

TAO_Blocked_Connect_Strategy::TAO_Blocked_Connect_Strategy (
    TAO_ORB_Core *orb_core)
  : TAO_Connect_Strategy (orb_core)
{
}

TAO_Blocked_Connect_Strategy::~TAO_Blocked_Connect_Strategy (void)
{
}


void
TAO_Blocked_Connect_Strategy::synch_options (ACE_Time_Value *timeout,
                                             ACE_Synch_Options &options)
{
  if (timeout != 0)
    {
      // Blocking with a timeout
      options.set (ACE_Synch_Options::USE_TIMEOUT,
                   *timeout);
    }
  else
    {
      // Making it sure it is blocking.
      options.set (0,
                   ACE_Time_Value::zero);
    }
}


int
TAO_Blocked_Connect_Strategy::wait (TAO_Connection_Handler *,
                                    ACE_Time_Value * )
{
  // We cannot wait for connection completion
  return -1;
}

int
TAO_Blocked_Connect_Strategy::wait (TAO_Transport *,
                                    ACE_Time_Value *)
{
  // We cannot wait for connection completion
  return -1;
}

TAO_END_VERSIONED_NAMESPACE_DECL