 
     var delegateQueue = dispatch_queue_create("TunnelQueue", DISPATCH_QUEUE_SERIAL) {
         didSet {
-            self.proxySocket.delegateQueue = delegateQueue
-            self.adapterSocket?.delegateQueue = delegateQueue
+            self.proxySocket.queue = delegateQueue
+            self.adapterSocket?.queue = delegateQueue
         }
     }
 
     var readySignal = 0
 
     var closed: Bool {
-        return proxySocket.disconnected && (adapterSocket?.disconnected ?? true)
+        return proxySocket.isDisconnected && (adapterSocket?.isDisconnected ?? true)
     }
 
     init(proxySocket: ProxySocket) {
         self.proxySocket = proxySocket
-        self.proxySocket.delegateQueue = delegateQueue
+        self.proxySocket.queue = delegateQueue
         super.init()
         self.proxySocket.delegate = self
     }

    }

    func close() {
        if !proxySocket.disconnected {
            proxySocket.disconnect()
        }
        if let adapterSocket = adapterSocket {
            if !adapterSocket.disconnected {
                adapterSocket.disconnect()
            }
        }

        let manager = RuleManager.currentManager
        let factory = manager.match(request)
        adapterSocket = factory.getAdapter(request)
        adapterSocket!.queue = delegateQueue
        adapterSocket!.delegate = self
        adapterSocket!.openSocketWithRequest(request)
    }

    func readyToForward(socket: SocketProtocol) {
        readySignal += 1
        if readySignal == 2 {
            proxySocket.readDataWithTag(SocketTag.Forward)
