A report that provides metrics about how a connection was established.
SDKs
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 13.0+
- watchOS 6.0+
- Xcode 11.0+
Framework
- Network
Declaration
struct NWConnection.EstablishmentReport
A report that provides metrics about how a connection was established.
SDKs
Framework
struct NWConnection.EstablishmentReport
let duration: Time Interval
The total duration of the successful connection establishment attempt, from the preparing state to the ready state.
let previous Attempt Count: Int
The number of attempts made before the successful attempt, when the connection moved from the preparing state back to the waiting state.
let attempt Started After Interval: Time Interval
The time between the call to start and the beginning of the successful connection attempt.
var debug Description: String
The description of the report.
let resolutions: [NWConnection .Establishment Report .Resolution]
The array of resolution steps performed during connection establishment, in order from first resolved to last resolved.
struct NWConnection .Establishment Report .Resolution
A description of a single DNS resolution step.
let handshakes: [NWConnection .Establishment Report .Handshake]
The array of protocol handshakes in order from first completed to last completed.
struct NWConnection .Establishment Report .Handshake
A description of a single protocol handshake.
let proxy Configured: Bool
A Boolean indicating whether a proxy was configured on the connection.
let used Proxy: Bool
A Boolean indicating whether the connection used a proxy.
let proxy Endpoint: NWEndpoint?
The endpoint of the proxy the connection used.
Use reports to understand how DNS and protocol handshakes impact connection establishment.
func request Establishment Report(queue: Dispatch Queue, completion: (NWConnection .Establishment Report?) -> Void)
Requests a copy of the connection's establishment report once the connection is in the ready state.
func start Data Transfer Report() -> NWConnection .Pending Data Transfer Report
Begins a new data transfer report, which can later be collected.
class NWConnection .Pending Data Transfer Report
An outstanding data transfer report that has yet to be collected.
struct NWConnection .Data Transfer Report
A report that provides metrics about data being sent and received on a connection.