Renamed timeout variable to the context of TCP instead of ICMP
authorGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Tue, 2 Aug 2011 01:20:36 +0000 (22:20 -0300)
committerGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Tue, 2 Aug 2011 01:20:36 +0000 (22:20 -0300)
src/tcp/tcppinger.cpp
src/tcp/tcppinger.h

index 018e3b5..ea99374 100644 (file)
@@ -55,7 +55,7 @@ using I2n::Logger::GlobalLogger;
 TcpPinger::TcpPinger(
         io_service &io_serv,
         const string &source_network_interface_name,
-        const int echo_reply_timeout_in_sec
+        const int rst_reply_timeout_in_sec
 ) :
     IoService( io_serv ),
     DestinationEndpoint(),
@@ -67,7 +67,7 @@ TcpPinger::TcpPinger(
     TimeSent( microsec_clock::universal_time() ),
     ReplyBuffer(),
     ReceivedReply( false ),
-    EchoReplyTimeoutInSec( echo_reply_timeout_in_sec ),
+    RstReplyTimeoutInSec( rst_reply_timeout_in_sec ),
     PingerStatus( PingStatus_NotSent ),
     PingDoneCallback()
 {
@@ -202,7 +202,7 @@ void TcpPinger::start_send()
     // Wait up to N seconds for a reply.
     ReceivedReply = false;
     (void) TcpSegmentReceiveTimer.expires_at(
-            TimeSent + seconds( EchoReplyTimeoutInSec )
+            TimeSent + seconds( RstReplyTimeoutInSec )
     );
     TcpSegmentReceiveTimer.async_wait(
             boost::bind( &TcpPinger::handle_timeout, this )
@@ -235,7 +235,7 @@ void TcpPinger::handle_timeout()
 {
     ReceivedReply = false;
     TcpSegmentReceiveTimer.expires_at(
-            TimeSent + seconds( EchoReplyTimeoutInSec )
+            TimeSent + seconds( RstReplyTimeoutInSec )
     );
     TcpSegmentReceiveTimer.async_wait(
             boost::bind( &TcpPinger::start_send, this )
index 3826681..4013cdc 100644 (file)
@@ -44,7 +44,7 @@ public:
     TcpPinger(
             boost::asio::io_service &io_service,
             const std::string &source_network_interface_name,
-            const int echo_reply_timeout_in_sec
+            const int rst_reply_timeout_in_sec
     );
     virtual ~TcpPinger();
 
@@ -113,7 +113,7 @@ private:
     /// number of replies to the ICMP echo request
     bool ReceivedReply;
     /// the amount of time to wait for the reply
-    int EchoReplyTimeoutInSec;
+    int RstReplyTimeoutInSec;
     /// the status of the pinger
     TcpPinger::PingStatus PingerStatus;
     /// Callback to notify when the ping is done (got reply/timeout)