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
565 stars 52 forks source link

[Enhancement] keep a list of peers internally in the API, and add a P2PT.sendAll(msg) function #19

Open therealadityashankar opened 4 years ago

therealadityashankar commented 4 years ago

Hey Subins, my apologies for opening so many issues and no PRs,

I think having to manually deal with the abstraction of peers is kinda annoying, and if a user simply wants to send a message to all listening peers he should directly be able to do so without having to store all peers in a list

usage example:

p2pt.sendAll(JSON.stringify({message:"Hi Everyone!"}))