{"size": 346, "ext": "js", "max_stars_repo_path": "server/socket/message.js", "max_stars_repo_name": "RobYed/wesomuga", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "server/socket/message.js", "max_issues_repo_name": "RobYed/wesomuga", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "server/socket/message.js", "max_forks_repo_name": "RobYed/wesomuga", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 15.7272727273, "max_line_length": 31, "alphanum_fraction": 0.5809248555}
'use strict';

class SocketMessage {

  constructor(event, payload) {
    this._header = {
      event: event,
      dateSent: new Date()
    };
    this._payload = payload;
  }

  toJSON() {
    var msg = {
        header: this._header,
        payload: this._payload
    };
    return JSON.stringify(msg);
  }
}

module.exports = SocketMessage;