OpenDDS  Snapshot(2023/04/28-20:55)
UdpSendStrategy.cpp
Go to the documentation of this file.
1 /*
2  *
3  *
4  * Distributed under the OpenDDS License.
5  * See: http://www.opendds.org/license.html
6  */
7 
8 #include "UdpSendStrategy.h"
9 #include "UdpDataLink.h"
10 #include "UdpInst.h"
12 
14 
15 namespace OpenDDS {
16 namespace DCPS {
17 
19  : TransportSendStrategy(0, link->impl(),
20  0, // synch_resource
21  link->transport_priority(),
23  link_(link)
24 {
25 }
26 
27 ssize_t
28 UdpSendStrategy::send_bytes_i(const iovec iov[], int n)
29 {
30  ACE_SOCK_Dgram& socket = this->link_->socket();
31  return socket.send(iov, n, this->link_->remote_address());
32 }
33 
34 void
36 {
37 }
38 
39 } // namespace DCPS
40 } // namespace OpenDDS
41 
RcHandle< T > make_rch()
Definition: RcHandle_T.h:256
UdpSendStrategy(UdpDataLink *link)
int ssize_t
ACE_HANDLE socket(int protocol_family, int type, int proto)
ACE_INET_Addr & remote_address()
Definition: UdpDataLink.inl:34
virtual void stop_i()
Let the subclass stop.
ACE_SOCK_Dgram & socket()
Definition: UdpDataLink.inl:40
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
ssize_t send(const void *buf, size_t n, const ACE_Addr &addr, int flags=0) const
virtual ssize_t send_bytes_i(const iovec iov[], int n)
The Internal API and Implementation of OpenDDS.
Definition: AddressCache.h:28