         }
     }
     
-    public func discoverCharacteristics(_ characteristics: [BluetoothUUID],
-                                        for service: Service<Peripheral, UInt16>,
-                                        timeout: TimeInterval) throws -> [Characteristic<Peripheral, UInt16>] {
+    public func discoverCharacteristics(
+        _ characteristics: Set<BluetoothUUID>,
+        for service: Service<Peripheral, UInt16>,
+        timeout: TimeInterval) async throws -> [Characteristic<Peripheral, UInt16>] {
         
         assert(service.peripheral == peripheral)
         

            else { throw CentralError.invalidAttribute(characteristic.uuid) }
        
        // GATT request
        let value = try _async(timeout: timeout) {
            client.readCharacteristic(gattCharacteristic.attribute, completion: $0)
        }
        
        return value
    }
    
    public func writeValue(_ data: Data,
                           for characteristic: Characteristic<Peripheral, UInt16>,
                           withResponse: Bool = true,
                           timeout: TimeInterval) throws {
        
        assert(characteristic.peripheral == peripheral)
        

//
//  Created by Alsey Coleman Miller on 7/18/18.
//

#if canImport(BluetoothGATT)
import Foundation
import Bluetooth
import BluetoothGATT

@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
internal final class GATTClientConnection <L2CAPSocket: L2CAPSocketProtocol> {
    
    // MARK: - Properties
