mldonkey-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mldonkey-users] pango-20021128b


From: Pierre Etchemaite
Subject: Re: [Mldonkey-users] pango-20021128b
Date: Thu, 28 Nov 2002 20:30:24 +0100

Le Thu, 28 Nov 2002 19:07:18 +0100, Roland Arendes <address@hidden> a
écrit :

> However, It was planned to be lil' slower, because the requests flood
> is stopped and it's more economic and fair.
> It's definitely a step forward.

Well, they're two main modifications for FileRequests. The first, to
avoid triggering eMule ban, a new timer for FileRequests, separate
from timers for connection, was added for each client. Since
you will also receive connections you didn't initiate, this is required (ok,
maybe that could be avoided with some clever coding, but adding another
timer was straightforward).

The second modification is in donkeyClient.ml::query_files. Instead of

List.iter (fun file ->
        if file_state file = FileDownloading then
          direct_client_send sock (
            let module M = DonkeyProtoClient in
            let module C = M.QueryFile in
              M.QueryFileReq file.file_md4);          
                   incr nqueries
                ) !current_files;   (* <=== *)

I do

List.iter (fun file ->
        if file_state file = FileDownloading then
          direct_client_send sock (
            let module M = DonkeyProtoClient in
            let module C = M.QueryFile in
              M.QueryFileReq file.file_md4);          
                   incr nqueries
                ) c.client_source_for;   (* <=== *)

Not much difference, instead of asking for all the files currently
downloading, I ask for the (downloading) files that the connected peer is
known to be a source for.

That looks like a totally logical modification, so either mldonkey was so
far acting as greedyly as possible (maybe sometimes finding a new source by
luck), or there's something obvious I'm missing. I've observed some clients
in mldonkey lists that are not known to be the source of any file, I wonder
if it's a consequence of this modification, or some leechers that send
requests for files they deny being a source for...





reply via email to

[Prev in Thread] Current Thread [Next in Thread]