July 27th Friday (七月 二十七日 金曜日)

  Immediately after the connection establishment the client sends several query messages regarding the file it wishes to download.

  The basic message exchange is composed from four messages: A sends a file request message immediately followed by a requested
file ID message.  B replies to the file request by a file request answer and to the requested file ID message by a file status
message.  In my viewpoint, it could be more easier than in this way to adopt two messages (a request and reply).

  The extended protocol adds two messages to this sequence a source request and a source answer.  This extension is used to pass
B's source to A.  To elaborate, there is no requirement that B completes to download a file before it can send file parts to other
clients, B can send to A any part it has completed to download even when it has only a small fragment of the file.

  When A requests a file from B, but B does not have this file in its shared files.  B skips the file request answer message and
send a file not found message, immmediately after the requested file ID message.

  For each uploaded file the client maintains an upload priority queue.  The priority of each client in the queue is calculated
on the basis of the client's time in the queue and a priority modifier.  At the head of the queue are clients which have the highest
"score".  The score is calculated using the following formula: score = (rating * seconds_in_the_queue) / 100 or ∞ in case the downloading
client is defined as a friend.  The initial rating value is 100 except for banned users which receive 0 rating (and thus are prevented
from reaching the top of the queue).  The rating is modified either by the downloading client's credit (which ranges from 1 - 10)
or by the uploaded file priority (0.2 - 1.8) which is set by the uploading client.  When a client's score is higher than the score
of the rest of the clients it starts downloading the file.  A client will continue to download a file until one of the following
conditions occurs:

1. The uploading client was terminated by the user;
2. The downloading client has got all the parts is needs for the file;
3. The downloading client was preempted by another downloading client which has higher priority than his.

  In order to allow a client which just started downloading to get a few megabytes of data before it is preempted, eMule boosts
the initial rating of a downloading client to 200 for the first 15 minutes of its download.


 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值