GithubHelp home page GithubHelp logo

Comments (3)

atomashpolskiy avatar atomashpolskiy commented on July 1, 2024 1

@kg6zvp ,

If you have the ID of a DHT node (this is different from BitTorrent's peer ID by the way and usually picked randomly for each session), you may use NodeLookup task in mldht to get the node's socket address. See bt.dht.MldhtService for an example of how to use mldht tasks.

Then you need to decide, what protocol is going to be used to talk to the peer. If it's BitTorrent, then you'll need a torrent ID (info hash) for establishing a standard BitTorrent connection. To connect to a peer, use bt.net.IPeerConnectionPool#requestConnection() method.

from bt.

kg6zvp avatar kg6zvp commented on July 1, 2024

Thank you. That's a very helpful answer, particularly with all the links to code you included. ๐Ÿ‘

Is there any way of establishing this type of connection without a torrent utilizing all of the hard work you and the bittorrent devs have already done to make connections stable? (Since the use case isn't BitTorrent, I mean) I don't mind using lower level APIs or hooking onto other bits of existing code in your library.

from bt.

atomashpolskiy avatar atomashpolskiy commented on July 1, 2024

Unfortunately, I'm afraid, that you'll need to look somewhere else for this. This project is in a very early stage and does not employ NAT traversal, as it requires a huge amount of effort to implement and test and does not bring much to the table in the scope of BitTorrent (in my opinion). Regarding Bt, it relies on direct socket-to-socket TCP connections, no fancy stuff.

from bt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.