Send ACKs when timestamp pending

This commit is contained in:
Keith Winstein
2011-08-10 02:05:49 -04:00
parent db2fa133cf
commit b2ea532f14
3 changed files with 10 additions and 7 deletions
+6 -4
View File
@@ -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;