Type Alias


A report that provides metrics about how a connection was established.


typealias nw_establishment_report_t = OS_nw_establishment_report


Inspecting Connection Attempts

func nw_establishment_report_get_duration_milliseconds(nw_establishment_report_t) -> UInt64

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

func nw_establishment_report_get_previous_attempt_count(nw_establishment_report_t) -> UInt32

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

func nw_establishment_report_get_attempt_started_after_milliseconds(nw_establishment_report_t) -> UInt64

Accesses the time between the call to start and the beginning of the successful connection attempt, in milliseconds.

Inspecting Resolution

func nw_establishment_report_enumerate_resolutions(nw_establishment_report_t, (nw_report_resolution_source_t, UInt64, UInt32, nw_endpoint_t, nw_endpoint_t) -> Bool)

Iterates a list of resolution steps performed during connection establishment, in order from first resolved to last resolved.

typealias nw_report_resolution_enumerator_t

A block used to enumerate resolution steps performed during connection establishment.

struct nw_report_resolution_source_t

Sources that may provide DNS responses.

Inspecting Protocol Handshakes

func nw_establishment_report_enumerate_protocols(nw_establishment_report_t, (nw_protocol_definition_t, UInt64, UInt64) -> Bool)

Iterates a list of protocol handshakes in order from first completed to last completed.

typealias nw_report_protocol_enumerator_t

A block used to enumerate protocol handshakes performed during connection establishment.

Checking for Proxies

See Also

Collecting Connection Metrics

func nw_connection_access_establishment_report(nw_connection_t, DispatchQueue, nw_establishment_report_access_block_t)

Requests a copy of the connection's establishment report once the connection is in the ready state.

typealias nw_establishment_report_access_block_t

A block that delivers a connection's establishment report when it's in the ready state.

typealias nw_data_transfer_report_t

A report that provides metrics about data being sent and received on a connection.

func nw_connection_create_new_data_transfer_report(nw_connection_t) -> nw_data_transfer_report_t

Begins a new data transfer report, which can later be collected.