You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
297 B
12 lines
297 B
3 years ago
|
|
||
|
peer.on('connection', function(conn) {
|
||
|
console.log(conn.peer+" has connected to me")
|
||
|
conn.on('open', function() {
|
||
|
peerlist[conn.peer]=conn
|
||
|
// Receive messages
|
||
|
conn.on('data', function(data) {
|
||
|
handleData(conn,data,"Their Connection")
|
||
|
})
|
||
|
})
|
||
|
})
|