Started working on ChatRoom class

This commit is contained in:
MrMasrozYTLIVE 2024-06-10 17:34:21 +03:00
parent 8788adbc2b
commit 4cfae430b2
2 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,10 @@
class ChatRoom {
public ChatRoom(topic, peers) {
this.topic = topic;
this.peers = peers;
}
}
export default ChatRoom;

View File

@ -21,6 +21,8 @@ class Client extends EventEmitter {
this.swarm.on('update', () => { this.swarm.on('update', () => {
console.log(`Peers count: ${this.swarm.connections.size}`); console.log(`Peers count: ${this.swarm.connections.size}`);
console.log([...this.swarm.connections])
process.exit(-1);
}); });
} }