MCPcopy
hub / github.com/4ian/GDevelop / MessagesList

Class MessagesList

Extensions/Multiplayer/peerJsHelper.ts:65–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63 }
64 /** @category Multiplayer */
65 export class MessagesList implements IMessagesList {
66 private readonly data: IMessageData[] = [];
67 private readonly messageName: string;
68
69 constructor(messageName: string) {
70 this.messageName = messageName;
71 }
72
73 public getName(): string {
74 return this.messageName;
75 }
76
77 public getMessages(): IMessageData[] {
78 return this.data;
79 }
80
81 public pushMessage(data: object, sender: string): void {
82 this.data.push(new MessageData(data, sender));
83 }
84 }
85
86 /**
87 * The peer to peer configuration.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected