libtorrent::stat Class Reference

#include <stat.hpp>

List of all members.

Public Member Functions

 stat ()
void operator+= (const stat &s)
void received_bytes (int bytes_payload, int bytes_protocol)
void sent_bytes (int bytes_payload, int bytes_protocol)
void second_tick (float tick_interval)
float upload_rate () const
float download_rate () const
float upload_payload_rate () const
float download_payload_rate () const
size_type total_payload_upload () const
size_type total_payload_download () const
size_type total_protocol_upload () const
size_type total_protocol_download () const
void add_stat (size_type downloaded, size_type uploaded)

Private Types

enum  { history = 10 }

Private Member Functions

void check_invariant () const

Private Attributes

float m_download_rate_history [history]
float m_upload_rate_history [history]
float m_download_payload_rate_history [history]
float m_upload_payload_rate_history [history]
int m_downloaded_payload
int m_uploaded_payload
int m_downloaded_protocol
int m_uploaded_protocol
size_type m_total_download_payload
size_type m_total_upload_payload
size_type m_total_download_protocol
size_type m_total_upload_protocol
float m_mean_download_rate
float m_mean_upload_rate
float m_mean_download_payload_rate
float m_mean_upload_payload_rate

Friends

class invariant_access


Detailed Description

Definition at line 47 of file stat.hpp.


Member Enumeration Documentation

anonymous enum [private]

Enumerator:
history 

Definition at line 50 of file stat.hpp.


Constructor & Destructor Documentation

libtorrent::stat::stat (  )  [inline]

Definition at line 53 of file stat.hpp.


Member Function Documentation

void libtorrent::stat::operator+= ( const stat s  )  [inline]

void libtorrent::stat::received_bytes ( int  bytes_payload,
int  bytes_protocol 
) [inline]

void libtorrent::stat::sent_bytes ( int  bytes_payload,
int  bytes_protocol 
) [inline]

void libtorrent::stat::second_tick ( float  tick_interval  ) 

float libtorrent::stat::upload_rate (  )  const [inline]

float libtorrent::stat::download_rate (  )  const [inline]

float libtorrent::stat::upload_payload_rate (  )  const [inline]

float libtorrent::stat::download_payload_rate (  )  const [inline]

size_type libtorrent::stat::total_payload_upload (  )  const [inline]

size_type libtorrent::stat::total_payload_download (  )  const [inline]

size_type libtorrent::stat::total_protocol_upload (  )  const [inline]

Definition at line 126 of file stat.hpp.

Referenced by libtorrent::aux::session_impl::status(), and libtorrent::torrent::status().

size_type libtorrent::stat::total_protocol_download (  )  const [inline]

Definition at line 127 of file stat.hpp.

Referenced by libtorrent::aux::session_impl::status(), and libtorrent::torrent::status().

void libtorrent::stat::add_stat ( size_type  downloaded,
size_type  uploaded 
) [inline]

Definition at line 132 of file stat.hpp.

Referenced by libtorrent::peer_connection::add_stat().

void libtorrent::stat::check_invariant (  )  const [inline, private]

Definition at line 141 of file stat.hpp.


Friends And Related Function Documentation

friend class invariant_access [friend]

Definition at line 49 of file stat.hpp.


Member Data Documentation

Definition at line 155 of file stat.hpp.

Referenced by second_tick().

float libtorrent::stat::m_upload_rate_history[history] [private]

Definition at line 156 of file stat.hpp.

Referenced by second_tick().

Definition at line 158 of file stat.hpp.

Referenced by second_tick().

Definition at line 159 of file stat.hpp.

Referenced by second_tick().

Definition at line 164 of file stat.hpp.

Referenced by operator+=(), and second_tick().

Definition at line 165 of file stat.hpp.

Referenced by operator+=(), and second_tick().

Definition at line 170 of file stat.hpp.

Referenced by operator+=(), and second_tick().

Definition at line 171 of file stat.hpp.

Referenced by operator+=(), and second_tick().

Definition at line 175 of file stat.hpp.

Definition at line 176 of file stat.hpp.

Definition at line 180 of file stat.hpp.

Definition at line 181 of file stat.hpp.

Definition at line 184 of file stat.hpp.

Referenced by second_tick().

Definition at line 185 of file stat.hpp.

Referenced by second_tick().

Definition at line 187 of file stat.hpp.

Referenced by second_tick().

Definition at line 188 of file stat.hpp.

Referenced by second_tick().


The documentation for this class was generated from the following files:

Generated on Sun May 25 00:21:43 2008 by  doxygen 1.5.6