00001 /* 00002 * 00003 * 00004 * Distributed under the OpenDDS License. 00005 * See: http://www.opendds.org/license.html 00006 */ 00007 00008 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL 00009 00010 namespace OpenDDS { 00011 namespace DCPS { 00012 00013 00014 00015 ACE_INLINE ACE_Reactor* 00016 RtpsUdpDataLink::get_reactor() 00017 { 00018 if (!reactor_task_) return 0; 00019 return reactor_task_->get_reactor(); 00020 } 00021 00022 ACE_INLINE bool 00023 RtpsUdpDataLink::reactor_is_shut_down() 00024 { 00025 if (!reactor_task_) return true; 00026 return reactor_task_->is_shut_down(); 00027 } 00028 00029 ACE_INLINE ACE_SOCK_Dgram& 00030 RtpsUdpDataLink::unicast_socket() 00031 { 00032 return unicast_socket_; 00033 } 00034 00035 ACE_INLINE ACE_SOCK_Dgram_Mcast& 00036 RtpsUdpDataLink::multicast_socket() 00037 { 00038 return multicast_socket_; 00039 } 00040 00041 ACE_INLINE void 00042 RtpsUdpDataLink::release_remote_i(const RepoId& remote_id) 00043 { 00044 ACE_GUARD(ACE_Thread_Mutex, g, lock_); 00045 locators_.erase(remote_id); 00046 } 00047 00048 #if defined(OPENDDS_SECURITY) 00049 ACE_INLINE DDS::Security::ParticipantCryptoHandle 00050 RtpsUdpDataLink::local_crypto_handle() const 00051 { 00052 return local_crypto_handle_; 00053 } 00054 00055 ACE_INLINE void 00056 RtpsUdpDataLink::local_crypto_handle(DDS::Security::ParticipantCryptoHandle h) 00057 { 00058 local_crypto_handle_ = h; 00059 } 00060 00061 ACE_INLINE DDS::Security::ParticipantCryptoHandle 00062 RtpsUdpDataLink::peer_crypto_handle(const RepoId& peer) const 00063 { 00064 const PeerHandlesCIter it = peer_crypto_handles_.find(peer); 00065 return (it == peer_crypto_handles_.end()) ? DDS::HANDLE_NIL : it->second; 00066 } 00067 00068 ACE_INLINE DDS::Security::DatawriterCryptoHandle 00069 RtpsUdpDataLink::writer_crypto_handle(const RepoId& writer) const 00070 { 00071 const PeerHandlesCIter it = peer_crypto_handles_.find(writer); 00072 return (it == peer_crypto_handles_.end()) ? DDS::HANDLE_NIL : it->second; 00073 } 00074 00075 ACE_INLINE DDS::Security::DatareaderCryptoHandle 00076 RtpsUdpDataLink::reader_crypto_handle(const RepoId& reader) const 00077 { 00078 const PeerHandlesCIter it = peer_crypto_handles_.find(reader); 00079 return (it == peer_crypto_handles_.end()) ? DDS::HANDLE_NIL : it->second; 00080 } 00081 #endif 00082 00083 } // namespace DCPS 00084 } // namespace OpenDDS 00085 00086 OPENDDS_END_VERSIONED_NAMESPACE_DECL