             }
             
             let prots = UInt32(kDNSServiceProtocol_IPv4) | UInt32(kDNSServiceProtocol_IPv6)
-            if (self.bluetoothOnly) {
+            switch self.bluepeerInterfaces {
+            case .any:
+                service.beginResolve(UInt32(kDNSServiceInterfaceIndexAny), includeP2P: true, addressLookupProtocols: prots)
+                break
+            case .notWifi:
                 service.beginResolve(kDNSServiceInterfaceIndexP2PSwift, includeP2P: true, addressLookupProtocols: prots)
-            } else {
-                service.beginResolve(UInt32(kDNSServiceInterfaceIndexAny), includeP2P: true, addressLookupProtocols: prots)
+                break
+            case .infrastructureModeWifiOnly:
+                service.beginResolve(UInt32(kDNSServiceInterfaceIndexAny), includeP2P: false, addressLookupProtocols: prots)
+                break
             }
         }
     }

    var serverSocket: GCDAsyncSocket?
    var publisher: HHServicePublisher?
    var browser: HHServiceBrowser?
    var bluetoothOnly: Bool = false
    open var advertisingRole: RoleType?
    var advertisingCustomData: [String:String]?
    open var browsing: Bool = false

    case poweredOff = 1
    case poweredOn = 2
    case other = 3
}

@objc public enum BluepeerInterfaces: Int {
    case any = 0
    case infrastructureModeWifiOnly
    case notWifi
}


