   # @param [Function] onerror: callback called on error
   constructor: (params) ->
     @params = params
+    @listeners = {}
     @service = @params['service']
     @channel = @params['channel']
     @log "Creating a parrot with channel: #{@channel}"

  @ASSETS_SERVER = "https://neighborparrot.com"
  @debug = false

  # Parrot constructot
  # @param [String] channel name
  # @param [Function] onmessage: callback called when receive a message

      _this.onopen.call _this, e
    , false)
    @ws.addEventListener('message', (e) ->
      _this.demuxMessage.call _this, e
    , false)
    @ws.addEventListener('error', (e) ->
      _this.onerror.call _this, e
