Method | Description | |
---|---|---|
GetBestPeer ( ) : string |
Method used to get the best sender peer at the moment of the call. The best peer of the queue is the FREE peer that has the lesser score. This method is blocking until there are no FREE peer into the network.
|
|
PeerQueue ( ) : System |
Default constructor of the class.
|
|
PeerQueue ( float>.Dictionary |
Constructor of the class used to actively insert a certain number of peer inside the queue.
|
|
ResetPeer ( string key, int newScore ) : void |
Method used to reset the state of a single peer into the queue. It sets the new score (as passed) of the peer indicated.
|
|
this ( string key ) : |
Operator overload of the operator square brackets. It directly refers to the inner dictionary.
|
public PeerQueue ( float>.Dictionary |
||
peerQueue | float>.Dictionary | /// A dictionay representing a bunch of peer each associated with a score of the peer. The less is /// the score, the better is the peer. /// |
return | System |
public ResetPeer ( string key, int newScore ) : void | ||
key | string | The URI representing the peer. |
newScore | int | The new score of the peer. |
return | void |
public this ( string key ) : |
||
key | string | The URI of the peer to select |
return |