Replies: 2 comments 5 replies
-
This now works for me !
|
Beta Was this translation helpful? Give feedback.
4 replies
-
Yes. Basically I am trying to emulate C++ code which add DHT nodes to a libtorrent session.
for (auto & seed : seeds) {
session->add_dht_node( std::make_pair( seed.c_str(), port ) );
}
But you’re right that I could also just add those hosts as peers for the torrent which is pretty close. There are many instances of this program running, each one being a peer.
I’ve seen some APIs like ‘addPeer on a torrent, idk if they are external or internal yet.
… On Aug 2, 2021, at 11:19 AM, Matt Joiner ***@***.***> wrote:
Just to confirm, you are trying to bootstrap your (implicit torrent.Client) DHT servers from these hosts? Otherwise you might just be looking to add those hosts as peers for the torrents, which is something else.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#541 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AC2O6UIXMG5ZJIHDBQ7JDRDT2ZPKNANCNFSM5BLFEQ2A>.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
I have a hard-coded list of string representing address:port (say host1:8080, host2:8082, etc...), and I'd like to use that to configure my client.
I see:
And by looking at the github repo for dht:
But I don't really know how to connect this. Do I need to set config.DhtStartingNodes to a function which return a list of Addr, and an error, and take as an input a string (network) ?
Edit: Addr seems to be defined as is:
The unittest does this actually:
Thanks !
Beta Was this translation helpful? Give feedback.
All reactions