HPNetwork Documentation Beta

Class Connection​Monitor

@available(OSX 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *)
public final class ConnectionMonitor 

Initializers

init(required​Interface​Type:​)

public init(requiredInterfaceType: NWInterface.InterfaceType) 

init()

public init() 

Properties

`default`

public static let `default` 

connection​Became​Satisfied​Notification

public static let connectionBecameSatisfiedNotification 

connection​Became​Unsatisfied​Notification

public static let connectionBecameUnsatisfiedNotification 

connection​Requires​Connection​Noticication

public static let connectionRequiresConnectionNoticication 

updated​Path​Key

public static let updatedPathKey = "ConnectionMonitorUpdatedPathKey"

path​Update​Handler

public var pathUpdateHandler: ((NWPath) -> Void)?

is​Monitoring

public private(set) var isMonitoring = false

current​Path

public var currentPath: NWPath? 

Methods

start​Monitoring(on:​)

public func startMonitoring(on queue: DispatchQueue = .init(label: "com.henrikpanhans.ConnectionMonitor", qos: .background)) 

stop​Monitoring()

public func stopMonitoring()