00001 /* 00002 * 00003 * 00004 * Distributed under the OpenDDS License. 00005 * See: http://www.opendds.org/license.html 00006 */ 00007 00008 #include "TcpAcceptor.h" 00009 #include "TcpDataLink.h" 00010 #include "TcpSendStrategy.h" 00011 #include "TcpReceiveStrategy.h" 00012 #include "dds/DCPS/transport/framework/NetworkAddress.h" 00013 #include "ace/SOCK_Connector.h" 00014 #include "dds/DCPS/transport/framework/EntryExit.h" 00015 00016 ACE_INLINE 00017 std::size_t& 00018 OpenDDS::DCPS::TcpConnection::id() 00019 { 00020 return id_; 00021 } 00022 00023 ACE_INLINE void 00024 OpenDDS::DCPS::TcpConnection::remove_receive_strategy() 00025 { 00026 DBG_ENTRY_LVL("TcpConnection","remove_receive_strategy",6); 00027 00028 this->receive_strategy_ = 0; 00029 } 00030 00031 ACE_INLINE void 00032 OpenDDS::DCPS::TcpConnection::remove_send_strategy() 00033 { 00034 DBG_ENTRY_LVL("TcpConnection","remove_send_strategy",6); 00035 00036 this->send_strategy_ = 0; 00037 } 00038 00039 ACE_INLINE bool 00040 OpenDDS::DCPS::TcpConnection::is_connector() const 00041 { 00042 return this->is_connector_; 00043 } 00044 00045 ACE_INLINE bool 00046 OpenDDS::DCPS::TcpConnection::is_connected() const 00047 { 00048 return this->connected_.value(); 00049 } 00050 00051 ACE_INLINE void 00052 OpenDDS::DCPS::TcpConnection::set_datalink(OpenDDS::DCPS::TcpDataLink* link) 00053 { 00054 // Keep a "copy" of the reference to the data link for ourselves. 00055 link->_add_ref(); 00056 this->link_ = link; 00057 } 00058 00059 ACE_INLINE ACE_INET_Addr 00060 OpenDDS::DCPS::TcpConnection::get_remote_address() 00061 { 00062 return this->remote_address_; 00063 } 00064 00065 ACE_INLINE 00066 OpenDDS::DCPS::Priority& 00067 OpenDDS::DCPS::TcpConnection::transport_priority() 00068 { 00069 return this->transport_priority_; 00070 } 00071 00072 ACE_INLINE 00073 OpenDDS::DCPS::Priority 00074 OpenDDS::DCPS::TcpConnection::transport_priority() const 00075 { 00076 return this->transport_priority_; 00077 }