         let manager = RuleManager.currentManager
         let factory = manager.match(request)
         adapterSocket = factory.getAdapter(request)
-        adapterSocket!.delegateQueue = delegateQueue
+        adapterSocket!.queue = delegateQueue
         adapterSocket!.delegate = self
         adapterSocket!.openSocketWithRequest(request)
     }
 
-    func readyForForward(socket: SocketProtocol) {
+    func readyToForward(socket: SocketProtocol) {
         readySignal += 1
         if readySignal == 2 {
             proxySocket.readDataWithTag(SocketTag.Forward)

    }

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


    var delegateQueue = dispatch_queue_create("TunnelQueue", DISPATCH_QUEUE_SERIAL) {
        didSet {
            self.proxySocket.queue = delegateQueue
            self.adapterSocket?.queue = delegateQueue
        }
    }

    var readySignal = 0

    var closed: Bool {
        return proxySocket.isDisconnected && (adapterSocket?.isDisconnected ?? true)
    }

    init(proxySocket: ProxySocket) {
        self.proxySocket = proxySocket
        self.proxySocket.queue = delegateQueue
        super.init()
        self.proxySocket.delegate = self
    }
