Send ACKs when timestamp pending
This commit is contained in:
+6
-4
@@ -94,8 +94,8 @@ Connection::Connection() /* server */
|
||||
next_seq( 0 ),
|
||||
saved_timestamp( -1 ),
|
||||
RTT_hit( false ),
|
||||
SRTT( 1 ),
|
||||
RTTVAR( .5 )
|
||||
SRTT( 1000 ),
|
||||
RTTVAR( 500 )
|
||||
{
|
||||
setup();
|
||||
}
|
||||
@@ -112,8 +112,8 @@ Connection::Connection( const char *key_str, const char *ip, int port ) /* clien
|
||||
next_seq( 0 ),
|
||||
saved_timestamp( -1 ),
|
||||
RTT_hit( false ),
|
||||
SRTT( 1 ),
|
||||
RTTVAR( .5 )
|
||||
SRTT( 1000 ),
|
||||
RTTVAR( 500 )
|
||||
{
|
||||
setup();
|
||||
|
||||
@@ -204,6 +204,8 @@ string Connection::recv( void )
|
||||
assert( now >= p.timestamp_reply );
|
||||
const double R = now - p.timestamp_reply;
|
||||
|
||||
fprintf( stderr, "Saw delay of %f\r\n", R );
|
||||
|
||||
if ( !RTT_hit ) { /* first measurement */
|
||||
SRTT = R;
|
||||
RTTVAR = R / 2;
|
||||
|
||||
Reference in New Issue
Block a user