Comments (3)
@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.
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.
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)
- [BUG] Many Incoming Encryption fail with InvalidMessage HOT 1
- [BUG] Weird metainfo validation error in CLI HOT 3
- [BUG] springboot use HOT 1
- how to download the file range pieces? HOT 2
- [BUG] Something does not work as it should
- Gradle issues with cling dependency library (upnp module) HOT 3
- Running CliClient.java Locally Reports an Error HOT 1
- java.lang.NoSuchMethodError: No virtual method getAnnotatedSuperclass()Ljava/lang/reflect/AnnotatedType; in class Ljava/lang/Class; or its super classes (declaration of 'java.lang.Class' appears in /apex/com.android.art/javalib/core-oj.jar) HOT 2
- Vulnerable dependencies
- [BUG] Cling 2.2.1 not found in Maven Central HOT 3
- How to access DHT Database at runtime? HOT 1
- Stopping client and stopWhenDownloaded() throws java.lang.RuntimeException HOT 1
- How can I get the info.files[0].filehash info
- [BUG] Something does not work as it should
- Dependency org.yaml:snakeyaml, leading to CVE problem
- Does it support Android๏ผ
- [BUG] Android - only maxSimultaneouslyAssignedPieces are downloaded if PieceSelector.getNextPieces supplies subset of all pieces in torrent HOT 3
- [QUESTION] Code affecting the performance HOT 2
- [BUG] Cannot decode torrent due to validation error
- [Request] Implement a getter-interface for events that receives Peer from an event
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bt.