         fatalError()
     }
     
-    public func disconnect(peripheral: Peripheral) {
+    // MARK: - Private Methods
+    
+    private func async <T> (timeout: TimeInterval, _ operation: @escaping () throws -> (T)) throws -> (T) {
         
-        fatalError()
+        var result: ErrorValue<T>?
+        
+        asyncQueue.async {
+            
+            do { result = .value(try operation()) }
+            
+            catch { result = .error(error) }
+        }
+        
+        let endDate = Date() + timeout
+        
+        while Date() < endDate {
+            
+            guard let response = result
+                else { sleep(100); continue }
+            
+            switch response {
+            case let .error(error):
+                throw error
+            case let .value(value):
+                return value
+            }
+        }
+        
+        // did timeout
+        throw CentralError.timeout
     }
+}
+/// Basic wrapper for error / value pairs.
+private enum ErrorValue<T> {
     
-    public func disconnectAll() {
-        
-        fatalError()
-    }
+    case error(Error)
+    case value(T)
 }
 
 #endif

                                    rssi: Double(report.rssi.rawValue),
                                    advertisementData: advertisement)
            
            
        }
    }
    
    public func connect(to peripheral: Peripheral, timeout: TimeInterval = 30) throws {
        
    }
    
    public func discoverServices(_ services: [BluetoothUUID] = [], for peripheral: Peripheral, timeout: TimeInterval = 30) throws -> [Service] {
        
        fatalError()
    }
    
    public func discoverCharacteristics(_ characteristics: [BluetoothUUID] = [], for service: BluetoothUUID, peripheral: Peripheral, timeout: TimeInterval = 30) throws -> [Characteristic] {
        
        
        fatalError()
    }
    
    public func readValue(for characteristic: BluetoothUUID, service: BluetoothUUID, peripheral: Peripheral, timeout: TimeInterval = 30) throws -> Data {

#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) {
        
