Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

examples #92

Open
thatcodeguy opened this issue Jul 9, 2017 · 4 comments
Open

examples #92

thatcodeguy opened this issue Jul 9, 2017 · 4 comments

Comments

@thatcodeguy
Copy link

Any chance some examples of how to use the different crates together will be added?

@GGist
Copy link
Owner

GGist commented Jul 9, 2017

Yes, I will definitely be adding some examples in the next few days of how the different crates will interact with one another. The last two crates that I really needed before I could make a good example were bip_peer (high priority) and bip_select (not as crucial, but would definitely make piece selection cleaner).

I am mostly doing a sweep over all of the crates in this repository to iron out some bugs/rough edges. Crates that are currently ready:

  • bip_bencode
  • bip_handshake
  • bip_metainfo
  • bip_disk
  • bip_peer (making some last enhancements here)

If its helpful for you in the mean time, bip_handshake, bip_metainfo, and bip_disk, all have runnable examples for using each of those crates individually.

For a good bittorrent client, I also need to implement:

  • bip_select

And crates which could be used, but largely need a rewrite since they aren't migrated to tokio yet (so usage may be un-ergonomic):

  • bip_dht
  • bip_utracker

I also created https://github.com/GGist/bittorrent-rs a couple days ago, which will eventually be a library and cli operating at a higher level than what these crates expose (but using these crates internally).

@thatcodeguy
Copy link
Author

Alright. Thanks for the detailed information, greatly appreciated!

I'll keep an eye on this. :)

@GGist
Copy link
Owner

GGist commented Jul 21, 2017

Initial example is up, it does require a bit of an understanding of tokio to really grok, but hopefully it can point you in the right direction.

Also creating this example caused me to see some issues/high priority enhancements with the project. In particular, #100, #103, #108, #110, #112, #113, #99, #101, #102, and #109 so thanks for that 👍

@zonque
Copy link

zonque commented Nov 11, 2018

Is there any application that uses the crates in this repo to implement a somewhat more advanced use case? crates.io pointed me a a repo called GGist/bittorrent which does not seem to exist (anymore?).

I'm specifically looking for an example on how to implement nodes for seeing and leeching, using DHT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants