code: function trigger(event, data) {
    // Warn if someone tries to trigger a message but the client socket
    // has already disconnected
    if (this.disconnected) {
      debug("Trying to trigger client socket but client is disconnected");
      return;
    }
  
    // If the broadcast flag is set, call to this.broadcast.send
    if (this.flags && this.flags.broadcast) {
      debug("Broadcasting %s to frontend clients, with data: %j.", event, data);
      this.broadcast.send({
        "event": event,
        "data": data
      });
    } else {
      debug("Triggering: %s on frontend with data: %j.", event, data);
      this.send({
        "event": event,
        "data": data
      });
    }
  }
docs: Triggers a message event that gets sent to the client
  
  @param {String} Message event to send to the client
  @param {Object} data to send to with the message