Acusis/inbound.js
2021-01-11 00:50:11 +02:00

13 lines
327 B
JavaScript

peer.on('connection', function(conn) {
console.log(conn.peer+" has connected to me")
conn.on('open', function() {
peerlist[conn.peer]=conn
console.log(peerlist)
// Receive messages
conn.on('data', function(data) {
handleData(conn,data,"Their Connection")
})
})
})