<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Network",
  "identifier" : "/documentation/Network/NWProtocolTCP/Metadata/setMaximumPacingRateBytesPerSecond(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Network"
    ],
    "preciseIdentifier" : "s:7Network13NWProtocolTCPC8MetadataC34setMaximumPacingRateBytesPerSecondyys6UInt64VSgF"
  },
  "title" : "setMaximumPacingRateBytesPerSecond(_:)"
}
-->

# setMaximumPacingRateBytesPerSecond(_:)

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

```
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).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)