     func writeString(aString:String){
         self.webSocket?.writeString(aString)
     }
+    
+    func isConnected() -> (Bool){
+        return self.webSocket!.isConnected
+    }
 
     // MARK: Websocket Delegate
     public func websocketDidConnect() {

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

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

