 #if os(Linux) || (Xcode && SWIFT_PACKAGE)
     
 import Foundation
+import Dispatch
 import Bluetooth
 import BluetoothLinux
-    
+
 @available(OSX 10.12, *)
 public final class LinuxCentral: CentralProtocol {
+    
+    internal typealias AdvertisingReport = HCILEAdvertisingReport.Report
     
     public var log: ((String) -> ())?
     
     public let hostController: HostController
+    
+    internal lazy var asyncQueue = DispatchQueue(label: "\(type(of: self)) Operation Queue")
+    
+    internal private(set) var scanData = [Peripheral: AdvertisingReport](minimumCapacity: 1)
+    
+    internal private(set) var connections = [Peripheral: L2CAPSocket](minimumCapacity: 1)
     
     public init(hostController: HostController) {
         

                     shouldContinueScanning: () -> (Bool),
                     foundDevice: @escaping (ScanData) -> ()) throws {
        
        try hostController.lowEnergyScan(filterDuplicates: filterDuplicates, shouldContinue: shouldContinueScanning) { (report) in
            
            #if os(Linux)
            let peripheral = Peripheral(identifier: report.address)

                                    rssi: Double(report.rssi.rawValue),
                                    advertisementData: advertisement)
            
            self.scanData[peripheral] = report
            
            foundDevice(scanData)
        }
    }
    
    public func connect(to peripheral: Peripheral, timeout: TimeInterval = 30) throws {
        
        guard let advertisementData = scanData[peripheral]
            else { throw CentralError.unknownPeripheral(peripheral) }
        
        let socket = try async(timeout: timeout) {
            
            try L2CAPSocket.lowEnergyClient(
                destination: (address: advertisementData.address,
                              type: AddressType(lowEnergy: advertisementData.addressType)
                )
            )
        }
        
        // keep connection open and store for future use
        self.connections[peripheral] = socket
    }
    
    public func disconnect(peripheral: Peripheral) {
        
        self.connections[peripheral] = nil
    }
    
    public func disconnectAll() {
        
        self.connections.removeAll(keepingCapacity: true)
    }
    
    public func discoverServices(_ services: [BluetoothUUID] = [],
                                 for peripheral: Peripheral,
                                 timeout: TimeInterval = 30) throws -> [Service] {
        
        guard let socket = connections[peripheral]
            else { throw CentralError.unknownPeripheral(peripheral) }
        
        
    }
    
    public func discoverCharacteristics(_ characteristics: [BluetoothUUID] = [],
                                        for service: BluetoothUUID,
                                        peripheral: Peripheral,
                                        timeout: TimeInterval = 30) throws -> [Characteristic] {
        
        
    }
    
    public func readValue(for characteristic: BluetoothUUID, service: BluetoothUUID, peripheral: Peripheral, timeout: TimeInterval = 30) throws -> Data {
