summaryrefslogtreecommitdiff
path: root/TAO/tao/Connection_Handler.inl
blob: 5c584b645653007b2cd8df58b10630a4a0f0e85e (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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// -*- C++ -*-
//
//$Id$

#include "tao/Transport.h"

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

ACE_INLINE TAO_ORB_Core *
TAO_Connection_Handler::orb_core (void)
{
  return this->orb_core_;
}

ACE_INLINE TAO_Transport *
TAO_Connection_Handler::transport (void)
{
  return this->transport_;
}

ACE_INLINE bool
TAO_Connection_Handler::is_closed (void) const
{
  return (this->state_ == TAO_LF_Event::LFS_CONNECTION_CLOSED ||
          this->state_ == TAO_LF_Event::LFS_TIMEOUT || this->is_closed_);
}

ACE_INLINE bool
TAO_Connection_Handler::is_timeout (void) const
{
  return (this->state_ == TAO_LF_Event::LFS_TIMEOUT);
}

ACE_INLINE bool
TAO_Connection_Handler::is_open (void) const
{
  return this->state_ == TAO_LF_Event::LFS_SUCCESS;
}

ACE_INLINE bool
TAO_Connection_Handler::is_connecting (void) const
{
  return this->state_ == TAO_LF_Event::LFS_CONNECTION_WAIT;
}


ACE_INLINE void
TAO_Connection_Handler::connection_pending (void)
{
  if (!this->connection_pending_)
    {
      this->connection_pending_ = true;
      this->transport()->add_reference();
    }
}

ACE_INLINE void
TAO_Connection_Handler::cancel_pending_connection (void)
{
  if (this->connection_pending_)
    {
      this->connection_pending_ = false;
      this->transport()->remove_reference();
    }
}

/// Derived classes should implement this for proper support with the
/// Blocking Flushing Strategy.
ACE_INLINE int
TAO_Connection_Handler::handle_write_ready (const ACE_Time_Value *)
{
  return 0;
}


//@@ CONNECTION_HANDLER_SPL_METHODS_ADD_HOOK

TAO_END_VERSIONED_NAMESPACE_DECL