wait for the waithandle to become signaled before continuing with the complete A tracker update *must* be performed before the engine is shut down, so you must If we want to stop a torrent, or the engine for whatever reason, we call engine.Stop() While (torrentManager.State != TorrentState.Stopped & torrentManager.State != TorrentState.Paused)Ĭonsole.WriteLine(torrentManager.Progress()) Keep running while the torrent isn't stopped or paused. Fired every time a peer message is sentĬ+= new EventHandler(peerMessageSentOrRecieved) Fired every time a connection is either created or destroyedĬ+=new EventHandler(peerConnectionChanged) TorrentManager.OnTorrentStateChanged+= new EventHandler(torrentStateChanged) Fired every time the torrent State changes (i.e. TorrentManager.OnPieceHashed+=new EventHandler(PieceHashed) TorrentManager.OnPeersAdded+=new EventHandler(PeersAdded) Fired every time a peer is added through DHT, PEX or Tracker Updates You can hook into various events in order to display information on screen: Or you can start one specific torrent by passing in that torrents ITorrentManager If you have loaded multiple torrents into the engine, you can start them all at once with this: TorrentManager = TorrentSettings.DefaultSettings) supplied when instantiating the engine torrentManager = This torrent would use the supplied settings instead of using the ones that were default settings that are set in the Engine. to the DefaultSaveLocation as specified in the EngineSettings and will inherit the torrent can just be loaded from the disk. torrentManager =engine.LoadTorrent(new Uri(""), Alternatively a. A torrent can be downloaded from the specified url, saved to the specified file and Instantiate a new engine with the engineSettings and Default Torrent settings.ĬlientEngine engine = new ClientEngine(engineSettings, torrentSettings) Each torrent will have 4 upload slots to allow 2.5kB/sec per slot. Each torrent will be allowed a max of 10kB/sec upload speed TorrentSettings torrentSettings = TorrentSettings.DefaultSettings Every torrent loaded into the engine for this session will start off with these default settings be automatic download speed limiting to 5x the selected upload.ĮngineSettings.GlobalMaxUploadSpeed = 30 At upload speeds of less than 5kB/sec, there will go directly into this directory, multifile torrents will create a directory within thisĮngineSettings.DefaultSavePath = Maximum upload speed of 30 kB/sec. All files will be downloaded using this as the base directory. The default location to download files to on your HardDrive, like a downloads folder These are the default settings for the engine for this sessionĮngineSettings engineSettings = EngineSettings.DefaultSettings An ITorrentManager is passed out of the engine when you load a torrent. Only uses one port for all communications.Supports upload and download speed limiting on per-torrent and a global basis.Compact and Non-Compact tracker responses supported.The client library contains all the functionality to create a BitTorrent client, or embed BitTorrent functionality in an application (e.g. There is a curses based UI, in module MonoCurses and a Windows.Forms UI in. It is available via annoymous SVN at this location: Ĭurrently there are no precompiled binaries hosted anywhere. The sourcecode for MonoTorrent is located in the mono SVN. Hopefully anyone who decides to use a library in an application would send an email in to get their application named in the Products Using MonoTorrent section. LicensingĪll the modules in MonoTorrent are licensed under the MIT/X11 license, so anyone is free to use them as they will. NET Framework or Mono Framework, be it Windows, Linux, MacOs or other. As a result these libraries will function on any operating system that supports either the Microsoft. torrent files.Īll of these libraries were written with Mono in mind. Torrent Creator - Allows the creation and editing of.Tracker Library - Allows the hosting of.Client Library - Allows the uploading/downloading of torrents.It is a complete BitTorrent suite of libraries which can be embedded in an application. MonoTorrent is the product of Googles Summer of Code 2006. For up to date information and samples please check at. Some of the information here is out of date. Visit the new documentation for updated content. This page is likely outdated (last edited on ).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |