Skip to content

Instantly share code, notes, and snippets.

@percybolmer
Created September 25, 2022 16:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save percybolmer/c3c56bf991799a218a811e8a60997e87 to your computer and use it in GitHub Desktop.
Save percybolmer/c3c56bf991799a218a811e8a60997e87 to your computer and use it in GitHub Desktop.
/**
* SendMessageEvent is used to send messages to other clients
* */
class SendMessageEvent {
constructor(message, from) {
this.message = message;
this.from = from;
}
}
/**
* NewMessageEvent is messages comming from clients
* */
class NewMessageEvent {
constructor(message, from, sent) {
this.message = message;
this.from = from;
this.sent = sent;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment