OpenDDS::DCPS::UdpSendStrategy Class Reference

#include <UdpSendStrategy.h>

Inheritance diagram for OpenDDS::DCPS::UdpSendStrategy:

Inheritance graph
[legend]
Collaboration diagram for OpenDDS::DCPS::UdpSendStrategy:

Collaboration graph
[legend]
List of all members.

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

UdpDataLinklink_

Detailed Description

Definition at line 20 of file UdpSendStrategy.h.


Constructor & Destructor Documentation

OpenDDS::DCPS::UdpSendStrategy::UdpSendStrategy ( UdpDataLink link  )  [explicit]

Definition at line 16 of file UdpSendStrategy.cpp.

00017   : TransportSendStrategy(0, TransportInst_rch(link->config(), false),
00018                           0,  // synch_resource
00019                           link->transport_priority(),
00020                           new NullSynchStrategy),
00021     link_(link)
00022 {
00023 }


Member Function Documentation

virtual size_t OpenDDS::DCPS::UdpSendStrategy::max_message_size (  )  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 30 of file UdpSendStrategy.h.

00031   {
00032     return UDP_MAX_MESSAGE_SIZE;
00033   }

ssize_t OpenDDS::DCPS::UdpSendStrategy::send_bytes_i ( const iovec  iov[],
int  n 
) [protected, virtual]

Implements OpenDDS::DCPS::TransportSendStrategy.

Definition at line 26 of file UdpSendStrategy.cpp.

References link_, and OpenDDS::DCPS::UdpDataLink::socket().

00027 {
00028   ACE_SOCK_Dgram& socket = this->link_->socket();
00029   return socket.send(iov, n, this->link_->remote_address());
00030 }

void OpenDDS::DCPS::UdpSendStrategy::stop_i (  )  [virtual]

Let the subclass stop.

Implements OpenDDS::DCPS::TransportSendStrategy.

Definition at line 33 of file UdpSendStrategy.cpp.

00034 {
00035 }


Member Data Documentation

UdpDataLink* OpenDDS::DCPS::UdpSendStrategy::link_ [private]

Definition at line 36 of file UdpSendStrategy.h.

Referenced by send_bytes_i().


The documentation for this class was generated from the following files:
Generated on Fri Feb 12 20:06:40 2016 for OpenDDS by  doxygen 1.4.7