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 24 of file UdpSendStrategy.h.


Constructor & Destructor Documentation

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 }


Member Function Documentation

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 }

Here is the call graph for this function:

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

Let the subclass stop.

Implements OpenDDS::DCPS::TransportSendStrategy.

Definition at line 35 of file UdpSendStrategy.cpp.

00036 {
00037 }


Member Data Documentation

Definition at line 40 of file UdpSendStrategy.h.

Referenced by send_bytes_i().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1