Method | Description | |
---|---|---|
GetChunk ( |
Method used to require a chunk to the peer represented by the inner channel.
|
|
PeerQueueElement ( ) : System |
Default constructor of the class.
|
|
PeerQueueElement ( string peerAddress, float peerScore, |
Constructor of the class that effectively valorize its attributes.
|
|
Reset ( ) : void |
Method actively used to reset a peer putting it in free state. If the peer have a timer active the timer is disabled.
|
|
TimedPeerBlock ( int millis ) : void |
Method used to block the peer (avoid to request again) for a certain number of milliseconds as passed by argument. For the time indicated the peer is put in the BUSY state; after that time the peer is resettled in FREE state.
|
Method | Description | |
---|---|---|
timerHandler ( object source, |
Method called by the timer to automatically call the Reset method. Each time this method is called the peer score is augmented by one.
|
public GetChunk ( |
||
chkrq | ChunkRequest object containing informations about the resource. | |
return | void |
public PeerQueueElement ( string peerAddress, float peerScore, |
||
peerAddress | string | URI address of the peer |
peerScore | float | Score of the peer (the less it is the better is the peer |
peerQueueNotEmpty | /// AutoResetEvent used to communicate to the Peer Queue that the queue is not empty. /// | |
return | System |
public TimedPeerBlock ( int millis ) : void | ||
millis | int | time used to block the peer. |
return | void |