Contents

onPathUpdate(_:)

Set a closure to be called when the connection’s path has changed, which may be called multiple times until the connection is cancelled.

Declaration

@discardableResult final func onPathUpdate(_ handler: @escaping @isolated(any) @Sendable (NetworkConnection<ApplicationProtocol>, NWPath) -> Void) -> Self

Discussion

This closure will inherit the isolation domain of the caller.