 
   onMessage: (msg) ->
     data = msg.data
+    @emit 'alive'
     return @treatHeartbeat(data) if @isHeartbeat(data)
     @log "> #{data}"
     return @treatNoSession(data) if @isNoSession(data)

          callback.call(@, host, port)
        else
          @log "Failed to determine which server to use: #{dataStr}"


  setTmpSong: (data) ->

      url  = "ws://#{host}:#{port}/socket.io/websocket"
      @ws = new WebSocket(url)
      @ws.onmessage = @onMessage.bind(@)
      @ws.onerror = @onError.bind(@)
      @ws.onclose = @onClose.bind(@)

  onError: (data) ->
    @emit 'wserror', data

  whichServer: (roomid, callback) ->
    options =
