|
OpenDDS
Snapshot(2023/04/07-19:43)
|
#include <TcpReceiveStrategy.h>


Public Member Functions | |
| TcpReceiveStrategy (TcpDataLink &link, const ReactorTask_rch &task) | |
| virtual | ~TcpReceiveStrategy () |
| int | reset (TcpConnection *old_connection, TcpConnection *new_connection) |
| ACE_Reactor * | get_reactor () |
| bool | gracefully_disconnected () |
Public Member Functions inherited from OpenDDS::DCPS::TransportReceiveStrategy<> | |
| virtual | ~TransportReceiveStrategy () |
| int | start () |
| void | stop () |
| int | handle_dds_input (ACE_HANDLE fd) |
| const TransportHeader & | received_header () const |
| TransportHeader & | received_header () |
| const DataSampleHeader & | received_sample_header () const |
| DataSampleHeader & | received_sample_header () |
| ACE_Message_Block * | to_msgblock (const ReceivedDataSample &sample) |
Public Member Functions inherited from OpenDDS::DCPS::TransportStrategy | |
| virtual | ~TransportStrategy () |
Public Member Functions inherited from OpenDDS::DCPS::RcObject | |
| virtual | ~RcObject () |
| virtual void | _add_ref () |
| virtual void | _remove_ref () |
| long | ref_count () const |
| WeakObject * | _get_weak_object () const |
Public Member Functions inherited from OpenDDS::DCPS::RcEventHandler | |
| RcEventHandler () | |
| ACE_Event_Handler::Reference_Count | add_reference () |
| ACE_Event_Handler::Reference_Count | remove_reference () |
Public Member Functions inherited from ACE_Event_Handler | |
| virtual | ~ACE_Event_Handler (void) |
| virtual ACE_HANDLE | get_handle (void) const |
| virtual void | set_handle (ACE_HANDLE) |
| virtual int | priority (void) const |
| virtual void | priority (int priority) |
| virtual int | handle_input (ACE_HANDLE fd=ACE_INVALID_HANDLE) |
| virtual int | handle_output (ACE_HANDLE fd=ACE_INVALID_HANDLE) |
| virtual int | handle_exception (ACE_HANDLE fd=ACE_INVALID_HANDLE) |
| virtual int | handle_timeout (const ACE_Time_Value ¤t_time, const void *act=0) |
| virtual int | handle_exit (ACE_Process *) |
| virtual int | handle_close (ACE_HANDLE handle, ACE_Reactor_Mask close_mask) |
| virtual int | handle_signal (int signum, siginfo_t *=0, ucontext_t *=0) |
| virtual int | resume_handler (void) |
| virtual int | handle_qos (ACE_HANDLE=ACE_INVALID_HANDLE) |
| virtual int | handle_group_qos (ACE_HANDLE=ACE_INVALID_HANDLE) |
| virtual void | reactor (ACE_Reactor *reactor) |
| virtual ACE_Reactor * | reactor (void) const |
| virtual ACE_Reactor_Timer_Interface * | reactor_timer_interface (void) const |
| Reference_Counting_Policy & | reference_counting_policy (void) |
Protected Member Functions | |
| virtual ssize_t | receive_bytes (iovec iov[], int n, ACE_INET_Addr &remote_address, ACE_HANDLE fd, bool &stop) |
| Only our subclass knows how to do this. More... | |
| virtual void | deliver_sample (ReceivedDataSample &sample, const ACE_INET_Addr &remote_address) |
| Called when there is a ReceivedDataSample to be delivered. More... | |
| virtual int | start_i () |
| Let the subclass start. More... | |
| virtual void | stop_i () |
| Let the subclass stop. More... | |
| virtual void | relink (bool do_suspend=true) |
Protected Member Functions inherited from OpenDDS::DCPS::TransportReceiveStrategy<> | |
| TransportReceiveStrategy (const TransportInst_rch &config, size_t receive_buffers_count=RECEIVE_BUFFERS) | |
| virtual bool | check_header (const TransportHeader &header) |
| Check the transport header for suitability. More... | |
| virtual bool | check_header (const DataSampleHeader &header) |
| Check the data sample header for suitability. More... | |
| virtual void | begin_transport_header_processing () |
| Begin Current Transport Header Processing. More... | |
| virtual void | end_transport_header_processing () |
| End Current Transport Header Processing. More... | |
| virtual void | finish_message () |
| int | skip_bad_pdus () |
| Ignore bad PDUs by skipping over them. More... | |
| void | reset () |
| size_t | pdu_remaining () const |
| size_t | successor_index (size_t index) const |
| Manage an index into the receive buffer array. More... | |
| void | update_buffer_index (bool &done) |
| virtual bool | reassemble (ReceivedDataSample &data) |
| OPENDDS_VECTOR (ACE_Message_Block *) receive_buffers_ | |
| Set of receive buffers in use. More... | |
Protected Member Functions inherited from OpenDDS::DCPS::RcObject | |
| RcObject () | |
Protected Member Functions inherited from ACE_Event_Handler | |
| ACE_Event_Handler (ACE_Reactor *=0, int priority=ACE_Event_Handler::LO_PRIORITY) | |
Private Attributes | |
| TcpDataLink & | link_ |
| ReactorTask_rch | reactor_task_ |
Definition at line 24 of file TcpReceiveStrategy.h.
| OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL OpenDDS::DCPS::TcpReceiveStrategy::TcpReceiveStrategy | ( | TcpDataLink & | link, |
| const ReactorTask_rch & | task | ||
| ) |
Definition at line 23 of file TcpReceiveStrategy.cpp.
References DBG_ENTRY_LVL.
|
virtual |
|
protectedvirtual |
Called when there is a ReceivedDataSample to be delivered.
Implements OpenDDS::DCPS::TransportReceiveStrategy<>.
Definition at line 58 of file TcpReceiveStrategy.cpp.
References OpenDDS::DCPS::TcpDataLink::ack_received(), OpenDDS::DCPS::DataLink::data_received(), DBG_ENTRY_LVL, OpenDDS::DCPS::GRACEFUL_DISCONNECT, OpenDDS::DCPS::TransportReceiveStrategy<>::gracefully_disconnected_, OpenDDS::DCPS::ReceivedDataSample::header_, link_, LM_DEBUG, OpenDDS::DCPS::DataSampleHeader::message_id_, OpenDDS::DCPS::REQUEST_ACK, OpenDDS::DCPS::TcpDataLink::request_ack_received(), OpenDDS::DCPS::SAMPLE_ACK, and VDBG.
Referenced by receive_bytes().
| OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE ACE_Reactor * OpenDDS::DCPS::TcpReceiveStrategy::get_reactor | ( | void | ) |
Definition at line 14 of file TcpReceiveStrategy.inl.
References ACE_INLINE, DBG_ENTRY_LVL, OpenDDS::DCPS::ReactorTask::get_reactor(), and reactor_task_.
| ACE_INLINE bool OpenDDS::DCPS::TcpReceiveStrategy::gracefully_disconnected | ( | ) |
Definition at line 21 of file TcpReceiveStrategy.inl.
References OpenDDS::DCPS::TransportReceiveStrategy<>::gracefully_disconnected_, and OPENDDS_END_VERSIONED_NAMESPACE_DECL.
|
protectedvirtual |
Only our subclass knows how to do this.
Implements OpenDDS::DCPS::TransportReceiveStrategy<>.
Definition at line 38 of file TcpReceiveStrategy.cpp.
References DBG_ENTRY_LVL, deliver_sample(), OpenDDS::DCPS::TcpDataLink::get_connection(), and link_.
|
protectedvirtual |
The subclass needs to provide the implementation for re-establishing the datalink. This is called when recv returns an error.
Reimplemented from OpenDDS::DCPS::TransportReceiveStrategy<>.
Definition at line 151 of file TcpReceiveStrategy.cpp.
References DBG_ENTRY_LVL, OpenDDS::DCPS::TcpDataLink::get_connection(), link_, and OPENDDS_END_VERSIONED_NAMESPACE_DECL.
| int OpenDDS::DCPS::TcpReceiveStrategy::reset | ( | TcpConnection * | old_connection, |
| TcpConnection * | new_connection | ||
| ) |
Definition at line 114 of file TcpReceiveStrategy.cpp.
References ACE_ERROR_RETURN, DBG_ENTRY_LVL, ACE_Event_Handler::DONT_CALL, OpenDDS::DCPS::TcpDataLink::drop_pending_request_acks(), OpenDDS::DCPS::ReactorTask::get_reactor(), link_, LM_ERROR, reactor_task_, ACE_Event_Handler::READ_MASK, ACE_Reactor::register_handler(), and ACE_Reactor::remove_handler().
Referenced by OpenDDS::DCPS::TcpDataLink::reuse_existing_connection().
|
protectedvirtual |
Let the subclass start.
Implements OpenDDS::DCPS::TransportReceiveStrategy<>.
Definition at line 80 of file TcpReceiveStrategy.cpp.
References ACE_DEBUG, ACE_ERROR_RETURN, ACE_TEXT(), DBG_ENTRY_LVL, OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::TcpDataLink::get_connection(), OpenDDS::DCPS::ReactorTask::get_reactor(), OpenDDS::DCPS::RcHandle< T >::in(), link_, LM_DEBUG, LM_ERROR, reactor_task_, ACE_Event_Handler::READ_MASK, and ACE_Reactor::register_handler().
|
protectedvirtual |
Let the subclass stop.
Implements OpenDDS::DCPS::TransportReceiveStrategy<>.
Definition at line 143 of file TcpReceiveStrategy.cpp.
References DBG_ENTRY_LVL, OpenDDS::DCPS::TcpDataLink::drop_pending_request_acks(), and link_.
|
private |
Definition at line 61 of file TcpReceiveStrategy.h.
Referenced by deliver_sample(), receive_bytes(), relink(), reset(), start_i(), and stop_i().
|
private |
Definition at line 62 of file TcpReceiveStrategy.h.
Referenced by get_reactor(), reset(), and start_i().
1.8.13