         @setMaxListeners(3000)  # every open file/table/sync db listens for connect event, which adds up.
 
         @emit("connecting")
+        @_call             =
+            queue   : []    # messages in the queue to send
+            count   : 0     # number of message currently outstanding
         @_id_counter       = 0
         @_sessions         = {}
         @_new_sessions     = {}

        @register_data_handler(opts.data_channel, session.handle_data)
        opts.cb(false, session)

    call: (opts={}) =>
        # This function:
        #    * Modifies the message by adding an id attribute with a random uuid value

        if not opts.cb?
            @send(opts.message)
            return
        @_call.queue.push(opts)
        @_update_calls()

    _update_calls: =>
        while @_call.queue.length > 0 and @_call.count <= MAX_CONCURRENT
            @_process_next_call()

    _process_next_call: =>
        if @_call.queue.length == 0
            return
        @_call.count += 1
        #console.log('count (call):', @_call.count)
        @_do_call @_call.queue.shift(), =>
            @_call.count -= 1
            #console.log('count (done):', @_call.count)
            @_update_calls()

    call_local_hub: (opts) =>
        opts = defaults opts,
