Need help changing max upload speed while seeding
See original GitHub issueHey!
I need some help changing the MaxUploadSpeed after/while seeding please.
This is basically the code I am using to start seeding. It’s more like an on demand seeding option so one can click Seed and only then the seeding will start:
private async void button_Seeding_Click(object sender, EventArgs e)
{
// Give an example of how settings can be modified for the engine.
var settingBuilder = new EngineSettingsBuilder
{
AllowPortForwarding = true,
AutoSaveLoadDhtCache = true,
AutoSaveLoadFastResume = true,
AutoSaveLoadMagnetLinkMetadata = true,
AllowLocalPeerDiscovery = true,
MaximumConnections = 300,
};
var torrent = await Torrent.LoadAsync(torrentfile);
dhtEngine = new DhtEngine(new IPEndPoint(IPAddress.Any, 0));
TorrentEngine = new ClientEngine(settingBuilder.ToSettings());
manager = await TorrentEngine.AddAsync(torrent, currentinstalldir);
manager.TorrentStateChanged += Manager_TorrentStateChanged1;
await dhtEngine.StartAsync();
await manager.StartAsync();
}
private void Manager_TorrentStateChanged1(object sender, TorrentStateChangedEventArgs e)
{
while (manager.State == TorrentState.Seeding)
{
manager.LocalPeerAnnounceAsync();
manager.DhtAnnounceAsync();
label_seeding.Text = manager.State + "... " + ConvertBytesToMegabytes(manager.Monitor.UploadSpeed).ToString("0.00" + " MB/s");
}
}
From here the torrent starts seeding at full speed as expected, but I would like to make use either a textbox or NumericUpDown in Windows Forms to be able to change the max upload speed while seeding. I just don’t know where and how to implement this. Any help will be much appreciated!
Issue Analytics
- State:
- Created a year ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
How to increase upload speed when seeding a specific file
Hello everyone, I recently joined a tracker that requires me to seed the torrents for an amount of time, I already finished downloading...
Read more >Low upload speed when seeding · Issue #684 · qbittorrent ...
Low upload speed when seeding #684 ... If downloading reducing the download max rate will increase the upload max rate possible.
Read more >Upload speed - seeding/leeching - Help and Support
Go to Bandwidth view and click Presets button. There you can add bandwidth presets and use them as seeding and downloading defaults. Tixati...
Read more >Optimising seeding speed for upload 10Mb/s (Currently ...
1. Changing alternate upload speed when not downloading to 0 · 2. Changing Global maximum no. connections to 1000 and max no. ·...
Read more >Settings to Optamize Seeding when Uploading?
Reduce maximum connections per torrent if you want higher seeding speeds...that way your upload is not split between so many peers. (Do this...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ah yeah, the joys of writing code in comments instead of an IDE.
@uponatime2019 had it right - you need to call
.ToSettings()
on the builder. Sorry for the confusion!NOTE: If you constantly create a new ‘SettingsBuilder’ without passing in the old settings, you’ll lose any settings you set previously. You should always initialise the
TorrentSettingsBuilder
(orEngineSettingsBuilder
) with a copy of the settings you want to modify/update. This is typicallyTorrentManager.Settings
orClientEngine.Settings
.So i used this which i found in another thread:
The on the numeric up down button I am using this:
I used
numericUpDown1.Value * 1000000
to get from bytes to megabytes. Hope that works. I still need to test it though. Running on a mobile network now so cannot test really 😦