         @debugMessage 'faye already inited'
         @connectToFaye()
   
+  # Faye extension for incoming and outgoing messages
   @fayeExtension:
     incoming : (message, callback) =>
       @debugMessage "incomming message #{message}"

window.Danthes = class Danthes
  @debug: false    

  @debugMessage: (message) ->
    console.log(message) if @debug
  
  @reset: ->
    @connecting = false
    @fayeClient = null

      retry: 5
      endpoints: {}

  # Connect to faye
  @faye: (callback) =>
    if @fayeClient?
      callback(@fayeClient)
