Get statistics
Version 1 (olivier dufour, 04/26/2009 06:36 AM) → Version 2/3 (olivier dufour, 04/27/2009 12:37 PM)
h1. Get statistics
h2. Global
ClientEngine.TotalDownloadSpeed
ClientEngine.TotalUploadSpeed
h2. Torrent
To get statistics of a torrrent you use the ConnectionMonitor object. have a class ConnectionMonitor.
It is available with torrentManager.Monitor
Here is list of what you can get:
* DataBytesDownloaded
* DataBytesUploaded
* DownloadSpeed
* ProtocolBytesDownloaded
* ProtocolBytesUploaded
* UploadSpeed
h2. Peer Global
ClientEngine.TotalDownloadSpeed
To have global information about peers:
TorrentManager.Peers.Seeds
TorrentManager.Peers.Leechs
TorrentManager.Peers.Available ClientEngine.TotalUploadSpeed
You can get detail about each peer in TorrentManager.GetPeers() or from a peerId get in an event.
h2. Peer
To get statistics of this particular peer a Peer you use the have a class ConnectionMonitor object (same than torrent).
It is available with PeerId.Monitor
And you have few things directely in the peerId object :
* AmChoking
* AmInterested
* BitField
* ClientApp
* Encryptor
* HashFails
* IsChoking
* IsConnected
* IsInterested
* IsSeeder
* IsRequestingPiecesCount
* PeerID
* PiecesSent
* PiecesReceived
* SupportsFastPeer
* SupportsLTMessages
* Uri