#include <UdpSendStrategy.h>
Public Member Functions | |
UdpSendStrategy (UdpDataLink *link) | |
virtual void | stop_i () |
Let the subclass stop. | |
Protected Member Functions | |
virtual ssize_t | send_bytes_i (const iovec iov[], int n) |
virtual size_t | max_message_size () const |
Private Attributes | |
UdpDataLink * | link_ |
Definition at line 24 of file UdpSendStrategy.h.
OpenDDS::DCPS::UdpSendStrategy::UdpSendStrategy | ( | UdpDataLink * | link | ) |
Definition at line 18 of file UdpSendStrategy.cpp.
00019 : TransportSendStrategy(0, link->impl(), 00020 0, // synch_resource 00021 link->transport_priority(), 00022 make_rch<NullSynchStrategy>()), 00023 link_(link) 00024 { 00025 }
virtual size_t OpenDDS::DCPS::UdpSendStrategy::max_message_size | ( | void | ) | const [inline, protected, virtual] |
The maximum size of a message allowed by the this TransportImpl, or 0 if there is no such limit. This is expected to be a constant, for example UDP/IPv4 can send messages of up to 65466 bytes. The transport framework will use the returned value (if > 0) to fragment larger messages. This fragmentation and reassembly will be transparent to the user.
Reimplemented from OpenDDS::DCPS::TransportSendStrategy.
Definition at line 34 of file UdpSendStrategy.h.
00035 { 00036 return UDP_MAX_MESSAGE_SIZE; 00037 }
ssize_t OpenDDS::DCPS::UdpSendStrategy::send_bytes_i | ( | const iovec | iov[], | |
int | n | |||
) | [protected, virtual] |
Implements OpenDDS::DCPS::TransportSendStrategy.
Definition at line 28 of file UdpSendStrategy.cpp.
References link_, OpenDDS::DCPS::UdpDataLink::remote_address(), ACE_SOCK_Dgram::send(), OpenDDS::DCPS::UdpDataLink::socket(), and socket().
00029 { 00030 ACE_SOCK_Dgram& socket = this->link_->socket(); 00031 return socket.send(iov, n, this->link_->remote_address()); 00032 }
void OpenDDS::DCPS::UdpSendStrategy::stop_i | ( | ) | [virtual] |
Let the subclass stop.
Implements OpenDDS::DCPS::TransportSendStrategy.
Definition at line 35 of file UdpSendStrategy.cpp.
UdpDataLink* OpenDDS::DCPS::UdpSendStrategy::link_ [private] |
Definition at line 40 of file UdpSendStrategy.h.
Referenced by send_bytes_i().