Contents

setMaximumPacingRateBytesPerSecond(_:)

Set the maximum pacing rate for this TCP connection, in bytes per second.

Declaration

func setMaximumPacingRateBytesPerSecond(_ maximumPacingRateBytesPerSecond: UInt64?)

Parameters

  • maximumPacingRateBytesPerSecond:

    Maximum pacing rate in bytes per second, or nil to disable pacing.

Discussion

TCP pacing spreads out packet transmission to avoid bursts and reduce network congestion. The actual on-wire rate is the minimum of this cap and the rate computed from the congestion window and RTT, so this value never increases throughput above what congestion control allows.

Pass nil to disable pacing on this connection — the connection will send without pacing (subject only to congestion control).