---
title: "earlyDataEnabled(_:)"
framework: network
role: symbol
role_heading: Instance Method
path: "network/tls/earlydataenabled(_:)"
---

# earlyDataEnabled(_:)

Enable early data (0-RTT) for TLS.

## Declaration

```swift
func earlyDataEnabled(_ enabled: Bool) -> TLS
```

## Parameters

- `enabled`: True to enable early data, false otherwise.

## Discussion

Discussion warning: This may have security implications for application data. In particular, TLS early data is replayable by a network attacker. You must account for this when sending data before the handshake is confirmed. See RFC 8446 for more information. You MUST NOT enable fast open without a specific application profile that defines its use.
