hammerspoon2-docs
    Preparing search index...

    Function reachabilityForAddressPair

    • Creates a reachability monitor for a source/destination IP address pair. Returns null if either address is not a valid IPv4 or IPv6 address literal. Under the hood this monitors general system connectivity (the same as reachabilityInternet()), because NWPathMonitor does not support per-address targeting.

      Parameters

      • localAddress: string

        An IPv4 or IPv6 source address string.

      • remoteAddress: string

        An IPv4 or IPv6 destination address string.

      Returns HSNetworkReachability | null

      A new HSNetworkReachability monitor, or null if either address is invalid.