 // MARK: FayeClient
 class FayeClient : TransportDelegate {
     var fayeURLString:String
-    var webSocket:WebSocket?
     var fayeClientId:String?
-    var delegate:FayeClientDelegate?
-    var transportDelegate:TransportDelegate?
+    weak var delegate:FayeClientDelegate?
     var transport:WebsocketTransport?
     
     private var fayeConnected:Bool?

    func writeString(aString:String){
        self.webSocket?.writeString(aString)
    }

    // MARK: Websocket Delegate
    public func websocketDidConnect() {

        return self.openSubscriptions.containsObject(channel)
    }
    
    func isTransportConnected() -> (Bool){
        return self.transport!.isConnected()
    }
}

