         return socketAddrData
     }
 
-    func isCandidateAddress(bluetoothOnly: Bool) -> Bool {
-        if bluetoothOnly && self.isWifiInterface() {
+    func isCandidateAddress(excludeWifi: Bool, onlyWifi: Bool) -> Bool {
+        if excludeWifi && self.isWifiInterface() {
+            return false
+        }
+        if onlyWifi && !self.isWifiInterface() {
             return false
         }
         if ProcessInfo().isOperatingSystemAtLeast(OperatingSystemVersion(majorVersion: 10, minorVersion: 0, patchVersion: 0)) {

        peer.customData = customData
        DLog("serviceDidResolve for \(peer.displayName) - addresses \(hhaddresses.count), peer.role: \(role), peer.state: \(peer.state), #customData:\(customData.count)")
        
        var limitToBluetooth = self.bluetoothOnly
        let candidates = hhaddresses.filter({ $0.isCandidateAddress(bluetoothOnly: limitToBluetooth) })
        if peer.state != .notConnected {
            DLog("... has state!=notConnected, so no-op")
            return
        } else if candidates.count == 0 {
            DLog("... no candidates out of \(hhaddresses.count) addresses. moreComing = \(moreComing)")
            if hhaddresses.count > 1 && !moreComing {
                if (self.browsingWorkaroundRestarts >= 3) {
                    DLog(" *** workarounds exhausted! falling back to not bluetoothOnly")
                    self.browsingWorkaroundRestarts = 0
                    limitToBluetooth = false
                    let secondaryCandidates = hhaddresses.filter({ $0.isCandidateAddress(bluetoothOnly: limitToBluetooth) })
                    if (secondaryCandidates.count <= 0) {
                        DLog("... STILL no candidates. Bummer.")
                        return

            NotificationCenter.default.addObserver(self, selector: #selector(willEnterForeground), name: NSNotification.Name.NSExtensionHostWillEnterForeground, object: nil)
        } 
        
        DLog("Initialized. Name: \(self.displayNameSanitized)")
    }
    
    deinit {
