Open djkazic opened 6 years ago
@djkazic definitely create a PR. If the code is fine (and if not - you can change it in scope of a PR, until it gets better and ready to be merged) then why not?!
@elgatito well, while it does work, it doesn't technically adhere very closely to the BEP. Mainly, that the advertisement rate is well above the recommended rate (1 per minute at most versus my 30 second poll time). This is due to the structure of this library in terms of how peers are added, and I'm not sure it would be acceptable for that reason.
It's kind of dirty to do a loop like this anyway. I wanted to also see if anyone had thought about working on this and could help me come up with a better overall solution.
@djkazic you should start a PR to get a code review and, maybe, some help.
Yes, please post a PR.
@djkazic: Thanks for the work! I +1 what's said above. Even if the code is not perfect as it is now, posting it already adds a lot of value. Reviews will come in for sure. And even if you don't have time to polish it yourself, others can move the issue forward, so it ends up merged. Please, post whatever you have to set the ball rolling.
Note that this is BEP 14 per https://github.com/anacrolix/torrent/issues/329#issuecomment-523795879.
Any update @djkazic ?
@djkazic friendly ping We'd love to have the code as is now :smile: It would be a pity that it might end lost
Hello everyone! I want help with LSD. I understood lsd proto and I can write lsd module. But, I think, I need help with integration it to torrent library.
@dd4e I can assist with the integration.
@dd4e I can assist with the integration.
I want to agree on implementation. The main task of LSD is to send and receive infohash (ihash) value. BEP14
I see the implementation in the form of a package with the transfer and receipt of ihash via channels. Channels are passed as parameters when the structure is initialized. The Start and Stop methods start and stop the announcement.
I have some questions:
Update: also need a host and port to identify the peer
I see the implementation in the form of a package with the transfer and receipt of ihash via channels. Channels are passed as parameters when the structure is initialized. The Start and Stop methods start and stop the announcement.
I think exposing channels are an anti-pattern in Go. A synchronous method to retrieve the next announce, or a callback should be fine.
- Is there a data type to store ihash or use a string (or array)?
https://pkg.go.dev/github.com/anacrolix/torrent#InfoHash
Update: also need a host and port to identify the peer
Do you mean the local Client? You can use any/all of the https://pkg.go.dev/github.com/anacrolix/torrent#Client.ListenAddrs.
Guys, any chance LPD will be available for this library?
@MetalRex101 I'm hoping for a community contribution on this, as I won't use it myself. @dd4e @djkazic can you advise on the status of your implementation(s), if any? Thanks.
For reference, axet/libtorrent (which happens to use this lib) already implements this. See lpd.go.
That implementation looks pretty reasonable, and is appropriately detached from the torrent package. It would be a candidate for being upstreamed if there's any interest.
@anacrolix It's been 3 years, maybe it's time for an update?
@VuzzyM everything to know is visible from this issue. 3rd party contributions appear to be stalled.
For the record, I filed an issue a month ago in @axet's repo on GitLab if anyone wants to track it. Although no obligation, obviously, neither on him nor @anacrolix (as he already stated a few comments above).
I can take a PR or funding to implement this. See WebRTC and BitTorrent v2 support for previous success stories on this front.
I have an implementation for the UDP multicast message sending. Would you consider a PR to merge it?