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

Modernify #59

Open subins2000 opened 1 year ago

subins2000 commented 1 year ago

Will be done in branch modernify

RonaldZielaznicki commented 9 months ago

Was looking p2pt over to use in one of my projects and thought I'd drop a question or two that might help while you are doing this re-write to modernify.

1. Why not extend bittorrent-tracker's client instead of re-implementing much of its logic?

It looks like p2pt is a custom client that is passed over to the trackers. But when you start looking at the client implementation that bittorrent-tracker has and p2pt's implementation, there is overlap.

To point a few out, _defaultAnnounceOpts, _announce/_fetchPeers, getTrackerStats/scrape, setIdentifier/constructor.

There's a few more overlaps here and there. Not trying to say rolling completely custom isn't the way to go since we don't need the other tracker types but was wondering about that.

subins2000 commented 7 months ago

@RonaldZielaznicki I don't exactly remember the reasons but I think it was because of the difference between the usecases. I guess I didn't want to carry all the methods from bittorrent-tracker's client.