             return
 
         # The rest of the function is basically the same as "h(data.slice(1))", except that
-        # it ensure that we handle at most 1 message per client every 50ms (or whatever
-        # the param is below).   This is another anti-DOS measure, which of course also
-        # helps with scaling up to many users.
-
+        # it ensure that if there is a burst of messages, then (1) we handle at most 1 message
+        # per client every MESG_QUEUE_INTERVAL_MS, and we drop messages if there are too many.
+        # This is an anti-DOS measure.
+        
         @_handle_data_queue.push([h, data.slice(1)])
 
         if @_handle_data_queue_empty_function?

SALVUS_HOME=process.cwd()

REQUIRE_ACCOUNT_TO_EXECUTE_CODE = false

# node.js -- builtin libraries
net     = require 'net'

                delete @_handle_data_queue_empty_function
                return

            # drop oldest message to keep
            while @_handle_data_queue.length > MESG_QUEUE_MAX_COUNT
                @_handle_data_queue.shift()

            # get task
            task = @_handle_data_queue.shift()
            # do task
            task[0](task[1])
            # do next one in >= MESG_QUEUE_INTERVAL_MS
            setTimeout( @_handle_data_queue_empty_function, MESG_QUEUE_INTERVAL_MS )

        @_handle_data_queue_empty_function()

