code: function onmessage(packet) {
      if (arguments.length === 2) packet = arguments[1];
      packet = parse(packet);
  
      if (allowed(packet)) emit(packet);
    }
docs: Handle incomming messages.
  
  @param {String} packet The message
  @api private