<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Network",
  "identifier" : "/documentation/Network/NWConnection/EstablishmentReport",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Network"
    ],
    "preciseIdentifier" : "s:7Network12NWConnectionC19EstablishmentReportV"
  },
  "title" : "NWConnection.EstablishmentReport"
}
-->

# NWConnection.EstablishmentReport

A report that provides metrics about the establishment of a connection.

```
struct EstablishmentReport
```

## Overview

Use this report to inspect connection establishment details, such as its resolution steps, use of proxies, and duration.

This report shows different data when iCloud Private Relay makes the connection. iCloud Private Relay can change the timing and sequence of events for your connections by using a set of privacy proxies.

When iCloud Private Relay is in use, any proxied connections have the [`usedProxy`](/documentation/Network/NWConnection/EstablishmentReport/usedProxy) property set. The [`handshakes`](/documentation/Network/NWConnection/EstablishmentReport/handshakes) property contains information about the stages of proxy connections used, and the timings to establish the end-to-end connection.

Connections that aren’t proxied might still use iCloud Private Relay for name resolution. In this case, the [`resolutions`](/documentation/Network/NWConnection/EstablishmentReport/resolutions) property includes information about resolutions that use the `https` DNS protocol.

## Topics

### Inspecting Connection Attempts

[`duration`](/documentation/Network/NWConnection/EstablishmentReport/duration)

The total duration of the successful connection establishment attempt, from the preparing state to the ready state.

[`previousAttemptCount`](/documentation/Network/NWConnection/EstablishmentReport/previousAttemptCount)

The number of attempts made before the successful attempt, when the connection moved from the preparing state back to the waiting state.

[`attemptStartedAfterInterval`](/documentation/Network/NWConnection/EstablishmentReport/attemptStartedAfterInterval)

The time between the call to start and the beginning of the successful connection attempt.

### Inspecting Resolution

[`resolutions`](/documentation/Network/NWConnection/EstablishmentReport/resolutions)

The array of resolution steps performed during connection establishment, in order from first resolved to last resolved.

[`Resolution`](/documentation/Network/NWConnection/EstablishmentReport/Resolution)

A description of a single DNS resolution step.

### Inspecting Protocol Handshakes

[`handshakes`](/documentation/Network/NWConnection/EstablishmentReport/handshakes)

The array of protocol handshakes in order from first completed to last completed.

[`Handshake`](/documentation/Network/NWConnection/EstablishmentReport/Handshake)

A description of a single protocol handshake.

### Checking for Proxies

[`proxyConfigured`](/documentation/Network/NWConnection/EstablishmentReport/proxyConfigured)

A Boolean indicating whether a proxy was configured on the connection.

[`usedProxy`](/documentation/Network/NWConnection/EstablishmentReport/usedProxy)

A Boolean indicating whether the connection used a proxy.

[`proxyEndpoint`](/documentation/Network/NWConnection/EstablishmentReport/proxyEndpoint)

The endpoint of the proxy the connection used.

## Relationships

### Conforms To

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

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

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

---

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)