OpenDDS
Snapshot(2023/04/07-19:43)
|
#include <TcpSendStrategy.h>
Public Member Functions | |
TcpSendStrategy (std::size_t id, TcpDataLink &link, TcpSynchResource *synch_resource, const ReactorTask_rch &task, Priority priority) | |
virtual | ~TcpSendStrategy () |
int | reset (bool reset_mode=false) |
virtual void | schedule_output () |
Enable or disable output processing by the reactor according to mode. More... | |
virtual void | terminate_send_if_suspended () |
![]() | |
virtual | ~TransportSendStrategy () |
void | send_buffer (TransportSendBuffer *send_buffer) |
Assigns an optional send buffer. More... | |
int | start () |
void | stop () |
void | send_start () |
void | send (TransportQueueElement *element, bool relink=true) |
void | send_stop (GUID_t repoId) |
RemoveResult | remove_sample (const DataSampleElement *sample) |
void | remove_all_msgs (const GUID_t &pub_id) |
virtual WorkOutcome | perform_work () |
void | suspend_send () |
void | resume_send () |
void | terminate_send (bool graceful_disconnecting=false) |
Remove all samples in the backpressure queue and packet queue. More... | |
virtual bool | start_i () |
Let the subclass start. More... | |
void | link_released (bool flag) |
bool | isDirectMode () |
void | deliver_ack_request (TransportQueueElement *element) |
bool | fragmentation_helper (TransportQueueElement *original_element, TqeVector &elements_to_send) |
void | clear (SendMode new_mode, SendMode old_mode=MODE_NOT_SET) |
SendMode | mode () const |
Access the current sending mode. More... | |
![]() | |
virtual | ~ThreadSynchWorker () |
std::size_t | id () const |
DataLink reference value for diagnostics. More... | |
![]() | |
virtual | ~RcObject () |
virtual void | _add_ref () |
virtual void | _remove_ref () |
long | ref_count () const |
WeakObject * | _get_weak_object () const |
Protected Member Functions | |
virtual ssize_t | send_bytes (const iovec iov[], int n, int &bp) |
virtual ACE_HANDLE | get_handle () |
virtual ssize_t | send_bytes_i (const iovec iov[], int n) |
virtual void | relink (bool do_suspend=true) |
virtual void | stop_i () |
Let the subclass stop. More... | |
virtual void | add_delayed_notification (TransportQueueElement *element) |
![]() | |
TransportSendStrategy (std::size_t id, const TransportImpl_rch &transport, ThreadSynchResource *synch_resource, Priority priority, const ThreadSynchStrategy_rch &thread_sync_strategy) | |
virtual ssize_t | non_blocking_send (const iovec iov[], int n, int &bp) |
virtual void | prepare_header_i () |
Specific implementation processing of prepared packet header. More... | |
virtual void | prepare_packet_i () |
Specific implementation processing of prepared packet. More... | |
TransportQueueElement * | current_packet_first_element () const |
virtual size_t | max_message_size () const |
void | set_graceful_disconnecting (bool flag) |
Set graceful disconnecting flag. More... | |
bool | send_delayed_notifications (const TransportQueueElement::MatchCriteria *match=0) |
virtual Security::SecurityConfig_rch | security_config () const |
virtual RemoveResult | do_remove_sample (const GUID_t &pub_id, const TransportQueueElement::MatchCriteria &criteria, bool remove_all=false) |
Implement framework chain visitations to remove a sample. More... | |
ThreadSynch * | synch () const |
void | set_header_source (ACE_INT64 source) |
![]() | |
ThreadSynchWorker (std::size_t id=0) | |
![]() | |
RcObject () | |
Private Attributes | |
TcpDataLink & | link_ |
ReactorTask_rch | reactor_task_ |
Additional Inherited Members | |
![]() | |
enum | SendMode { MODE_NOT_SET, MODE_DIRECT, MODE_QUEUE, MODE_SUSPEND, MODE_TERMINATED } |
typedef BasicQueue< TransportQueueElement > | QueueType |
![]() | |
enum | WorkOutcome { WORK_OUTCOME_MORE_TO_DO, WORK_OUTCOME_NO_MORE_TO_DO, WORK_OUTCOME_CLOGGED_RESOURCE, WORK_OUTCOME_BROKEN_RESOURCE } |
![]() | |
static int | mb_to_iov (const ACE_Message_Block &msg, iovec *iov) |
![]() | |
static const size_t | UDP_MAX_MESSAGE_SIZE = 65466 |
Definition at line 25 of file TcpSendStrategy.h.
OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL OpenDDS::DCPS::TcpSendStrategy::TcpSendStrategy | ( | std::size_t | id, |
TcpDataLink & | link, | ||
TcpSynchResource * | synch_resource, | ||
const ReactorTask_rch & | task, | ||
Priority | priority | ||
) |
Definition at line 21 of file TcpSendStrategy.cpp.
References DBG_ENTRY_LVL.
|
virtual |
|
protectedvirtual |
Reimplemented from OpenDDS::DCPS::TransportSendStrategy.
Definition at line 131 of file TcpSendStrategy.cpp.
References OpenDDS::DCPS::TransportSendStrategy::add_delayed_notification(), and OpenDDS::DCPS::TransportQueueElement::is_request_ack().
|
protectedvirtual |
Reimplemented from OpenDDS::DCPS::TransportSendStrategy.
Definition at line 89 of file TcpSendStrategy.cpp.
References OpenDDS::DCPS::TcpDataLink::get_connection(), and link_.
Referenced by schedule_output().
|
protectedvirtual |
Delegate to the connection object to re-establish the connection.
Reimplemented from OpenDDS::DCPS::TransportSendStrategy.
Definition at line 114 of file TcpSendStrategy.cpp.
References DBG_ENTRY_LVL, OpenDDS::DCPS::TcpDataLink::get_connection(), and link_.
int OpenDDS::DCPS::TcpSendStrategy::reset | ( | bool | reset_mode = false | ) |
This is called by the datalink object to associate with the "new" connection object. The "old" connection object is unregistered with the reactor and the "new" connection object is registered for sending. The implementation of this method is borrowed from the ReceiveStrategy.
Definition at line 66 of file TcpSendStrategy.cpp.
References OpenDDS::DCPS::TransportSendStrategy::clear(), DBG_ENTRY_LVL, OpenDDS::DCPS::TransportSendStrategy::MODE_DIRECT, and OpenDDS::DCPS::TransportSendStrategy::set_graceful_disconnecting().
Referenced by OpenDDS::DCPS::TcpDataLink::reuse_existing_connection().
|
virtual |
Enable or disable output processing by the reactor according to mode.
Reimplemented from OpenDDS::DCPS::ThreadSynchWorker.
Definition at line 43 of file TcpSendStrategy.cpp.
References ACE_DEBUG, ACE_TEXT(), DBG_ENTRY_LVL, OpenDDS::DCPS::DCPS_debug_level, get_handle(), LM_DEBUG, OpenDDS::DCPS::TransportSendStrategy::mode(), OpenDDS::DCPS::TransportSendStrategy::MODE_DIRECT, OpenDDS::DCPS::TransportSendStrategy::MODE_QUEUE, OpenDDS::DCPS::TransportSendStrategy::MODE_SUSPEND, OpenDDS::DCPS::TransportSendStrategy::synch(), and OpenDDS::DCPS::ThreadSynch::work_available().
|
protectedvirtual |
Reimplemented from OpenDDS::DCPS::TransportSendStrategy.
Definition at line 82 of file TcpSendStrategy.cpp.
References DBG_ENTRY_LVL, and OpenDDS::DCPS::TransportSendStrategy::non_blocking_send().
|
protectedvirtual |
Implements OpenDDS::DCPS::TransportSendStrategy.
Definition at line 100 of file TcpSendStrategy.cpp.
References ACE_DEBUG, OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::TcpDataLink::get_connection(), link_, and LM_DEBUG.
|
protectedvirtual |
Let the subclass stop.
Implements OpenDDS::DCPS::TransportSendStrategy.
Definition at line 125 of file TcpSendStrategy.cpp.
References DBG_ENTRY_LVL.
|
virtual |
Reimplemented from OpenDDS::DCPS::TransportSendStrategy.
Definition at line 140 of file TcpSendStrategy.cpp.
References OpenDDS::DCPS::TransportSendStrategy::clear(), DBG_ENTRY_LVL, OpenDDS::DCPS::TransportSendStrategy::MODE_SUSPEND, OpenDDS::DCPS::TransportSendStrategy::MODE_TERMINATED, and OPENDDS_END_VERSIONED_NAMESPACE_DECL.
|
private |
Definition at line 58 of file TcpSendStrategy.h.
Referenced by get_handle(), relink(), and send_bytes_i().
|
private |
Definition at line 59 of file TcpSendStrategy.h.