From 4cfae430b2859c5ea6a8d13b883b71431529eb69 Mon Sep 17 00:00:00 2001 From: MrMasrozYTLIVE <61359286+MrMasrozYTLIVE@users.noreply.github.com> Date: Mon, 10 Jun 2024 17:34:21 +0300 Subject: [PATCH] Started working on ChatRoom class --- chatBot/includes/chatroom.js | 10 ++++++++++ chatBot/includes/client.js | 2 ++ 2 files changed, 12 insertions(+) create mode 100644 chatBot/includes/chatroom.js diff --git a/chatBot/includes/chatroom.js b/chatBot/includes/chatroom.js new file mode 100644 index 0000000..89b2afe --- /dev/null +++ b/chatBot/includes/chatroom.js @@ -0,0 +1,10 @@ +class ChatRoom { + public ChatRoom(topic, peers) { + this.topic = topic; + this.peers = peers; + } + + +} + +export default ChatRoom; \ No newline at end of file diff --git a/chatBot/includes/client.js b/chatBot/includes/client.js index 09964f5..26de967 100644 --- a/chatBot/includes/client.js +++ b/chatBot/includes/client.js @@ -21,6 +21,8 @@ class Client extends EventEmitter { this.swarm.on('update', () => { console.log(`Peers count: ${this.swarm.connections.size}`); + console.log([...this.swarm.connections]) + process.exit(-1); }); }