C# Class Universal.Torrent.Client.PeerConnections.PeerId

Exibir arquivo Open project: haroldma/Universal.Torrent Class Usage Examples

Public Properties

Property Type Description
PieceReads List

Private Properties

Property Type Description
Dequeue Universal.Torrent.Client.Messages.PeerMessage
Enqueue void
EnqueueAt void
GetActiveSetSize int
GetDownloadRate int
InitializeTyrant void
IsUnderUploadLimit bool
PeerId System
TryProcessAsyncReads void
UpdateTyrantStats void

Public Methods

Method Description
CloseConnection ( ) : void
Equals ( object obj ) : bool
GetHashCode ( ) : int
SendMessage ( PeerMessage message ) : void
ToString ( ) : string

Private Methods

Method Description
Dequeue ( ) : PeerMessage
Enqueue ( PeerMessage msg ) : void
EnqueueAt ( PeerMessage message, int index ) : void
GetActiveSetSize ( int uploadRate ) : int

Stolen from reference BitTyrant implementation (see org.gudy.azureus2.core3.peer.TyrantStats)

GetDownloadRate ( ) : int

Get our download rate from this peer -- this is Dp. 1. If we are not choked by this peer, return the actual measure download rate. 2. If we are choked, then attempt to make an educated guess at the download rate using the following steps - use the rate of Have messages received from this peer as an estimate of its download rate - assume that its upload rate is equivalent to its estimated download rate - divide this upload rate by the standard implementation's active set size for that rate

InitializeTyrant ( ) : void
IsUnderUploadLimit ( ) : bool

Compares the actual upload rate with the upload rate that we are supposed to be limiting them to (UploadRateForRecip)

PeerId ( Peer peer, TorrentManager manager ) : System
TryProcessAsyncReads ( ) : void
UpdateTyrantStats ( ) : void

Should be called by ChokeUnchokeManager.ExecuteReview Logic taken from BitTyrant implementation

Method Details

CloseConnection() public method

public CloseConnection ( ) : void
return void

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool

GetHashCode() public method

public GetHashCode ( ) : int
return int

SendMessage() public method

public SendMessage ( PeerMessage message ) : void
message Universal.Torrent.Client.Messages.PeerMessage
return void

ToString() public method

public ToString ( ) : string
return string

Property Details

PieceReads public_oe property

public List PieceReads
return List