subins2000 / p2pt

Simple WebRTC Peer 2 Peer connections using WebTorrent trackers as the signalling server. Use WebTorrent trackers for any kind of WebRTC app ! 🔥 Make WebRTC apps fast & easy ! 🚀⭐
https://WebDrop.Space
MIT License
564 stars 52 forks source link

Possibility to destroy only tracker connection and not peer connections #23

Closed Gronis closed 3 years ago

Gronis commented 3 years ago

Lets say i'm building an app that only wants to connect to peers initially, but later can disconnect to the tracker because we have established a connection. This does not work currently because the destroy function disconnects everything.

proposal:

Implement additional method for disconnecting trackers:

p2p.destroyTrackers()
Gronis commented 3 years ago

Ok, I see now that there is a p2p.removeTracker(announceUrl). So this effectively is what I was after.