<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Network",
  "identifier" : "/documentation/Network/NWProtocolQUIC/Metadata/KeepAliveBehavior",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Network"
    ],
    "preciseIdentifier" : "s:7Network14NWProtocolQUICC8MetadataC17KeepAliveBehaviorO"
  },
  "title" : "NWProtocolQUIC.Metadata.KeepAliveBehavior"
}
-->

# NWProtocolQUIC.Metadata.KeepAliveBehavior

A QUIC connection keepalive behavior.

```
enum KeepAliveBehavior
```

## Topics

### Keepalive Behaviors

[`case on`](/documentation/Network/NWProtocolQUIC/Metadata/KeepAliveBehavior/on)

Keepalives are enabled with the default timeout.

[`case off`](/documentation/Network/NWProtocolQUIC/Metadata/KeepAliveBehavior/off)

Keepalives are disabled.

[`case seconds(Int)`](/documentation/Network/NWProtocolQUIC/Metadata/KeepAliveBehavior/seconds(_:))

Keepalives are enabled with a custom timeout, in seconds.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

---

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)