TCP::rtt

Description

Returns the smoothed round-trip time estimate for a TCP connection.

Syntax

TCP::rtt

TCP::rtt

  • Returns the smoothed round-trip time estimate for a TCP connection. Note that the value returned is in units of “1/32 of a millisecond”. (Divide the returned value by 32 to get the actual round trip time in milliseconds.) Note that the rtt takes some time to converge, so we recommend using ROUTE::rttvar to get the statistical variance of rtt in 1/16 ms intervals & cull outliers.

Examples

when HTTP_RESPONSE {
   clientside { set rtt [TCP::rtt] }
   if {$rtt < 1600 } {
      log "NOcompress rtt=$rtt"
      COMPRESS::disable
   }
   else {
      log "compress rtt=$rtt"
      COMPRESS::enable
      COMPRESS::gzip level 9
   }
}