<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -",
    "macCatalyst: 12.0.0 -",
    "macOS: 10.14.0 -",
    "tvOS: 12.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Network",
  "identifier" : "/documentation/Network/NWProtocolTCP/Options",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Network"
    ],
    "preciseIdentifier" : "s:7Network13NWProtocolTCPC7OptionsC"
  },
  "title" : "NWProtocolTCP.Options"
}
-->

# NWProtocolTCP.Options

A container of options for configuring how TCP is used on a connection.

```
class Options
```

## Topics

### Customizing TCP Options

[`init()`](/documentation/Network/NWProtocolTCP/Options/init())

Initializes a default set of TCP connection options.

[`enableFastOpen`](/documentation/Network/NWProtocolTCP/Options/enableFastOpen)

A Boolean that enables TCP Fast Open on a connection.

[`maximumSegmentSize`](/documentation/Network/NWProtocolTCP/Options/maximumSegmentSize)

TCP’s maximum segment size in bytes.

[`noDelay`](/documentation/Network/NWProtocolTCP/Options/noDelay)

A Boolean that disables Nagle’s algorithm for TCP.

[`noOptions`](/documentation/Network/NWProtocolTCP/Options/noOptions)

A Boolean that sets TCP into no-options mode.

[`noPush`](/documentation/Network/NWProtocolTCP/Options/noPush)

A Boolean that sets TCP into no-push mode.

[`retransmitFinDrop`](/documentation/Network/NWProtocolTCP/Options/retransmitFinDrop)

A Boolean that causes TCP to drop its connection after not receiving an ACK packet after a FIN packet.

[`disableAckStretching`](/documentation/Network/NWProtocolTCP/Options/disableAckStretching)

A Boolean that disables TCP acknowledgment stretching.

[`disableECN`](/documentation/Network/NWProtocolTCP/Options/disableECN)

A Boolean that disables negotiation of Explicit Congestion Notification markings.

### Configuring Keepalives

[`enableKeepalive`](/documentation/Network/NWProtocolTCP/Options/enableKeepalive)

A Boolean that enables TCP keepalives.

[`keepaliveIdle`](/documentation/Network/NWProtocolTCP/Options/keepaliveIdle)

The number of seconds of idleness that TCP waits before sending keepalive probes.

[`keepaliveCount`](/documentation/Network/NWProtocolTCP/Options/keepaliveCount)

The number of keepalive probes that TCP sends before terminating the connection.

[`keepaliveInterval`](/documentation/Network/NWProtocolTCP/Options/keepaliveInterval)

The number of seconds that TCP waits between sending keepalive probes.

### Setting Timeouts

[`connectionTimeout`](/documentation/Network/NWProtocolTCP/Options/connectionTimeout)

The number of seconds that TCP waits before timing out its handshake.

[`connectionDropTime`](/documentation/Network/NWProtocolTCP/Options/connectionDropTime)

The timeout, in seconds, for TCP retransmission attempts.

[`persistTimeout`](/documentation/Network/NWProtocolTCP/Options/persistTimeout)

The TCP persist timeout, in seconds, as defined by RFC 6429.



---

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)