00001 /* 00002 * 00003 * 00004 * Distributed under the OpenDDS License. 00005 * See: http://www.opendds.org/license.html 00006 */ 00007 00008 #include "UdpSendStrategy.h" 00009 #include "UdpDataLink.h" 00010 #include "UdpInst.h" 00011 #include "dds/DCPS/transport/framework/NullSynchStrategy.h" 00012 00013 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL 00014 00015 namespace OpenDDS { 00016 namespace DCPS { 00017 00018 UdpSendStrategy::UdpSendStrategy(UdpDataLink* link) 00019 : TransportSendStrategy(0, link->impl(), 00020 0, // synch_resource 00021 link->transport_priority(), 00022 make_rch<NullSynchStrategy>()), 00023 link_(link) 00024 { 00025 } 00026 00027 ssize_t 00028 UdpSendStrategy::send_bytes_i(const iovec iov[], int n) 00029 { 00030 ACE_SOCK_Dgram& socket = this->link_->socket(); 00031 return socket.send(iov, n, this->link_->remote_address()); 00032 } 00033 00034 void 00035 UdpSendStrategy::stop_i() 00036 { 00037 } 00038 00039 } // namespace DCPS 00040 } // namespace OpenDDS 00041 00042 OPENDDS_END_VERSIONED_NAMESPACE_DECL