Fixed app.js not sending user ID itself and only peers it knows #5
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', () => {
|
||||
console.log(`Peers count: ${this.swarm.connections.size}`);
|
||||
console.log([...this.swarm.connections])
|
||||
process.exit(-1);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user