I've been thinking about giving priorities to downloads. Graphically, it
would only add a numeric edit in the downloads pane, maybe near the
progress bar. And an option to activate it or not in the config.
The standard priority would be one for each download, and changing that
number you can change the relative bandwidth reserved for each download.
For example, if you have a bandwidth of 80KB/s, and three active
downloads with priorities 0.4, 1 and 3 (0.4 + 1 + 3 = 4.4), then the
reserved bandwidth for each file would be, respectively,
80*0.4/4.4=7.27KB/s, 80*1/4.4=18KB/s and 80*3/4.4=54.55KB/s.
In the case that the hosts can only provide, lets say, 25KB/s for the
third file, the one with a priority of 3, then, once it has passed the
time for getting those bytes with the buffer empty, use that bandwidth
lost for the other downloads. This is:
54.55-25=29.55KB/s --->
29.55*0.4/1.4=8.44KB/s(Total bandwidth for the first file: 7.27
+8.44=15.71KB/s)
29.55*1/1.4=21.10KB/s(Total bandwidth for the second file: 18
+21.10=39KB/s)
and so on.
Again, the total bandwidth usage is 80KB/s
Any comments? Where should I implement the code, in the lib part or the
core?
Regards
Paco
______________________________________________
Renovamos el Correo Yahoo!
Nuevos servicios, más seguridad
http://correo.yahoo.es
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Gtk-gnutella-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel