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

Documentation #275

Open
7 tasks
alanmcgovern opened this issue Mar 16, 2020 · 13 comments
Open
7 tasks

Documentation #275

alanmcgovern opened this issue Mar 16, 2020 · 13 comments

Comments

@alanmcgovern
Copy link
Owner

alanmcgovern commented Mar 16, 2020

Hi! If anyone has suggestions for scenarios which should be documented, let me know and I'll add them!

Scenarios

  • Creating a torrent using TorrentCreator. Adding Trackers and TrackerTiers.
  • Initializing and using Dht
  • Downloading a torrent with a download/upload rate limit.
  • Saving and restoring FastResume data
  • Streaming a file in a torrent
  • Port Forwarding (using https://github.com/alanmcgovern/Mono.Nat )
  • Downloading using MagnetLinks - saving to disk first and loading from memory.
@uponatime2019
Copy link

I look all easy for me because I'm using this library for a while, but when I start it's hard to understand when and why Saving and restoring FastResume data, and it's complex to build a quick torrent status like download speed, upload speed, seeds, peers, and may be we need an "human reader explain" why some time download is slow or fast

@Mercurial
Copy link

please need documentation!

@alanmcgovern
Copy link
Owner Author

@Mercurial Are there any specific examples you'd like to see?

@eivarin
Copy link

eivarin commented Apr 27, 2020

Was there any progress made for this???
Didn't want to use the old documentation (https://smuxi.im/projects/show/monotorrent) for my projects since it is outdated .....

One of the things I would like to see is to how to magnet url for a file and load it into the manager

Other is if there is a way to check which managers are registered to the engine
@alanmcgovern

@eivarin
Copy link

eivarin commented Apr 30, 2020

ping @alanmcgovern

@alanmcgovern
Copy link
Owner Author

alanmcgovern commented May 1, 2020

@eivarin I'll keep those points in mind when updating the documentation.

In the meantime, you can see all the torrents in an engine if you check the ClientEngine.Torrents property.

If you have a .torrent file and want to create a magnet link for it, you can do:

var torrent = Torrent.LoadAsync (@"c:\path\to\myfile.torrent");
var magetLink = new MagnetLink (torrent.InfoHash, torrent.Name, torrent.AnnounceUrls.SelectMany (t => t.ToArray ()).ToList ());

Uri url = magnetLink.ToV1Uri ();
string urlAsAString = magnetLink.ToV1String ();

TorrentManager can be instantiated using a MagnetLink object, though I do recommend using the ClientEngine.GetMetadataAsync (MagnetLink) API to retrieve the torrent metadata instead of directly creating a TorrentManager. Using this approach it becomes easy to save the metadata to disk somewhere, or have the user make a decision about whether they want to download the data, before you actually start downloading the actual torrent data.

EDIT: I added a note to fix up torrent.AnnounceUrls as that is a very weird/awkward API to use.

@eivarin
Copy link

eivarin commented May 2, 2020

What if I want to create a magnet link directly from the original file... not the torrent file, is there any way to do that's do I need to create the torrent file to create its magnet link?
also how much of the old documentation is outdated???
also how well is the dotnetcore example made??? is it okay to use that for reference???
Also can't seem to be able to use the API GetMetadataAsync, is it DownloadMetadataAsync?
also how do I control the metadata after downloading it using the API. when i say control I'm talking about loading it into the clientengine.
as soon as u answer the better
@alanmcgovern

@eivarin
Copy link

eivarin commented May 6, 2020

Another thing @alanmcgovern is it possible to do super seed? if so how would you do it in the most correct way?

@eivarin
Copy link

eivarin commented May 8, 2020

How to make the torrent manager lock the file so that it can't be moved nor written to when the manager state can be in every state but the stopped state?
I've tried to move a file which is being downloaded by the torrent and it moves without problems which may be a problem with file integrity
@alanmcgovern

edit: I changed every filestream opener to only give read shared access. that way no other program can mess around with that file and read to it

@r-kondaveeti-zz
Copy link

@alanmcgovern The old documentation on the website, I think, is no longer relevant. I'm trying to use MonoTorrent in a dotnet core project and having a hard time to go through the code. Updating the docs showing how to implement download in different scenarios is much appreciated. Thanks!

@Xyncgas
Copy link

Xyncgas commented Sep 18, 2020

An example to send and recieve hello world with two program, either server and client example, or example of a single program that I can use with two seperate computer and using a person testing with me after sending him to starbucks and tracker example please

@r-kondaveeti-zz
Copy link

I did not understand your question. If you need a basic example on how to use MonoTorrent refer to this code. https://github.com/r-kondaveeti/MovieApi/blob/master/MD.Backend.Transmission/Logic/TorrentLogic.cs

@JanBenicek
Copy link

Hi, would it be possible to better describe the part of the documentation related to creating a tracker server. There are parts with minimal descriptions and it is hard to work with such documentation.
@alanmcgovern

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

7 participants