UdpSendStrategy.cpp

Go to the documentation of this file.
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 namespace OpenDDS {
00014 namespace DCPS {
00015 
00016 UdpSendStrategy::UdpSendStrategy(UdpDataLink* link)
00017   : TransportSendStrategy(0, TransportInst_rch(link->config(), false),
00018                           0,  // synch_resource
00019                           link->transport_priority(),
00020                           new NullSynchStrategy),
00021     link_(link)
00022 {
00023 }
00024 
00025 ssize_t
00026 UdpSendStrategy::send_bytes_i(const iovec iov[], int n)
00027 {
00028   ACE_SOCK_Dgram& socket = this->link_->socket();
00029   return socket.send(iov, n, this->link_->remote_address());
00030 }
00031 
00032 void
00033 UdpSendStrategy::stop_i()
00034 {
00035 }
00036 
00037 } // namespace DCPS
00038 } // namespace OpenDDS

Generated on Fri Feb 12 20:05:28 2016 for OpenDDS by  doxygen 1.4.7