OpenDDS  Snapshot(2023/04/07-19:43)
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
OpenDDS::DCPS::TransportSendBuffer Class Referenceabstract

#include <TransportSendBuffer.h>

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

Public Types

typedef TransportSendStrategy::LockType LockType
 

Public Member Functions

size_t capacity () const
 
void bind (TransportSendStrategy *strategy)
 
virtual void retain_all (const GUID_t &pub_id)
 
virtual void insert (SequenceNumber sequence, TransportSendStrategy::QueueType *queue, ACE_Message_Block *chain)=0
 
LockTypestrategy_lock ()
 

Protected Types

typedef TransportSendStrategy::QueueType QueueType
 
typedef std::pair< QueueType *, ACE_Message_Block * > BufferType
 

Protected Member Functions

 TransportSendBuffer (size_t capacity)
 
virtual ~TransportSendBuffer ()
 
void resend_one (const BufferType &buffer)
 

Protected Attributes

TransportSendStrategystrategy_
 
const size_t capacity_
 

Private Member Functions

 TransportSendBuffer (const TransportSendBuffer &)
 
TransportSendBufferoperator= (const TransportSendBuffer &)
 

Detailed Description

Abstract base class that forms the interface for TransportSendStrategy to store data for potential retransmission. Derived classes actually store the data and can utilize TransportSendBuffer's friendship in TransportSendStrategy to retransmit (see method "resend_one").

Definition at line 38 of file TransportSendBuffer.h.

Member Typedef Documentation

◆ BufferType

Definition at line 57 of file TransportSendBuffer.h.

◆ LockType

Definition at line 48 of file TransportSendBuffer.h.

◆ QueueType

Definition at line 56 of file TransportSendBuffer.h.

Constructor & Destructor Documentation

◆ TransportSendBuffer() [1/2]

OpenDDS::DCPS::TransportSendBuffer::TransportSendBuffer ( size_t  capacity)
inlineexplicitprotected

◆ ~TransportSendBuffer()

OpenDDS::DCPS::TransportSendBuffer::~TransportSendBuffer ( )
protectedvirtual

Definition at line 32 of file TransportSendBuffer.cpp.

33 {
34 }

◆ TransportSendBuffer() [2/2]

OpenDDS::DCPS::TransportSendBuffer::TransportSendBuffer ( const TransportSendBuffer )
private

Member Function Documentation

◆ bind()

ACE_INLINE void OpenDDS::DCPS::TransportSendBuffer::bind ( TransportSendStrategy strategy)

Definition at line 20 of file TransportSendBuffer.inl.

References ACE_INLINE, and strategy_.

Referenced by OpenDDS::DCPS::TransportSendStrategy::send_buffer().

21 {
22  this->strategy_ = strategy;
23 }

◆ capacity()

ACE_INLINE size_t OpenDDS::DCPS::TransportSendBuffer::capacity ( void  ) const

◆ insert()

virtual void OpenDDS::DCPS::TransportSendBuffer::insert ( SequenceNumber  sequence,
TransportSendStrategy::QueueType queue,
ACE_Message_Block chain 
)
pure virtual

◆ operator=()

TransportSendBuffer& OpenDDS::DCPS::TransportSendBuffer::operator= ( const TransportSendBuffer )
private

◆ resend_one()

void OpenDDS::DCPS::TransportSendBuffer::resend_one ( const BufferType buffer)
protected

Definition at line 42 of file TransportSendBuffer.cpp.

References OpenDDS::DCPS::TransportSendStrategy::do_send_packet(), strategy_, and OpenDDS::DCPS::SingleSendBuffer::UNLIMITED.

Referenced by OpenDDS::DCPS::SingleSendBuffer::resend_fragments_i(), and OpenDDS::DCPS::SingleSendBuffer::resend_i().

43 {
44  int bp = 0;
45  strategy_->do_send_packet(buffer.second, bp);
46 }
ssize_t do_send_packet(const ACE_Message_Block *packet, int &bp)
Form an IOV and call the send_bytes() template method.

◆ retain_all()

void OpenDDS::DCPS::TransportSendBuffer::retain_all ( const GUID_t pub_id)
virtual

Reimplemented in OpenDDS::DCPS::SingleSendBuffer.

Definition at line 37 of file TransportSendBuffer.cpp.

Referenced by OpenDDS::DCPS::TransportSendStrategy::remove_all_msgs().

38 {
39 }

◆ strategy_lock()

LockType& OpenDDS::DCPS::TransportSendBuffer::strategy_lock ( )
inline

Member Data Documentation

◆ capacity_

const size_t OpenDDS::DCPS::TransportSendBuffer::capacity_
protected

◆ strategy_

TransportSendStrategy* OpenDDS::DCPS::TransportSendBuffer::strategy_
protected

Definition at line 61 of file TransportSendBuffer.h.

Referenced by bind(), and resend_one().


The documentation for this class was generated from the following files: