00001 /* 00002 * 00003 * 00004 * Distributed under the OpenDDS License. 00005 * See: http://www.opendds.org/license.html 00006 */ 00007 00008 #include "Tcp_pch.h" 00009 #include "TcpSynchResource.h" 00010 #include "TcpConnection.h" 00011 #include "TcpSendStrategy.h" 00012 00013 OpenDDS::DCPS::TcpSynchResource::TcpSynchResource( 00014 const TcpConnection_rch& connection, 00015 const int& max_output_pause_period_ms) 00016 : ThreadSynchResource(connection->peer().get_handle()) 00017 , connection_(connection) 00018 { 00019 DBG_ENTRY_LVL("TcpSynchResource","TcpSynchResource",6); 00020 00021 if (max_output_pause_period_ms >= 0) { 00022 this->timeout_ = new ACE_Time_Value(max_output_pause_period_ms / 1000, 00023 max_output_pause_period_ms % 1000 * 1000); 00024 } 00025 } 00026 00027 OpenDDS::DCPS::TcpSynchResource::~TcpSynchResource() 00028 { 00029 DBG_ENTRY_LVL("TcpSynchResource","~TcpSynchResource",6); 00030 } 00031 00032 void 00033 OpenDDS::DCPS::TcpSynchResource::notify_lost_on_backpressure_timeout() 00034 { 00035 DBG_ENTRY_LVL("TcpSynchResource","notify_lost_on_backpressure_timeout",6); 00036 00037 this->connection_->notify_lost_on_backpressure_timeout(); 00038 }