forked from snxraven/LinkUp-P2P-Chat
Started working on ChatRoom class
This commit is contained in:
parent
8788adbc2b
commit
4cfae430b2
10
chatBot/includes/chatroom.js
Normal file
10
chatBot/includes/chatroom.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
class ChatRoom {
|
||||||
|
public ChatRoom(topic, peers) {
|
||||||
|
this.topic = topic;
|
||||||
|
this.peers = peers;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ChatRoom;
|
@ -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);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user