diff options
Diffstat (limited to 'TAO/tao/Connection_Handler.inl')
-rw-r--r-- | TAO/tao/Connection_Handler.inl | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/TAO/tao/Connection_Handler.inl b/TAO/tao/Connection_Handler.inl new file mode 100644 index 00000000000..25083177be2 --- /dev/null +++ b/TAO/tao/Connection_Handler.inl @@ -0,0 +1,69 @@ +// -*- 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); +} + +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(); + } +} + +//@@ CONNECTION_HANDLER_SPL_METHODS_ADD_HOOK + +TAO_END_VERSIONED_NAMESPACE_DECL |