• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdenetwork
  • Sitemap
  • Contact Us
 

kget

bt::PeerUploader

bt::PeerUploader Class Reference

#include <peeruploader.h>

List of all members.


Detailed Description

Author:
Joris Guisson

Uploads pieces to a Peer

This class handles the uploading of pieces to a Peer. It keeps track of a list of Request objects. All these Requests where sent by the Peer. It will upload the pieces to the Peer, making sure that the maximum upload rate isn't surpassed.

Definition at line 44 of file peeruploader.h.


Public Member Functions

void addRequest (const Request &r)
void addUploadedBytes (Uint32 bytes)
void clearAllRequests ()
Uint32 getNumRequests () const
 PeerUploader (Peer *peer)
void removeRequest (const Request &r)
Uint32 update (ChunkManager &cman, Uint32 opt_unchoked)
virtual ~PeerUploader ()

Constructor & Destructor Documentation

bt::PeerUploader::PeerUploader ( Peer *  peer  ) 

Constructor.

Set the Peer.

Parameters:
peer The Peer

Definition at line 34 of file peeruploader.cpp.

bt::PeerUploader::~PeerUploader (  )  [virtual]

Definition at line 40 of file peeruploader.cpp.


Member Function Documentation

void bt::PeerUploader::addRequest ( const Request &  r  ) 

Add a Request to the list of Requests.

Parameters:
r The Request

Definition at line 43 of file peeruploader.cpp.

void bt::PeerUploader::addUploadedBytes ( Uint32  bytes  )  [inline]

Definition at line 82 of file peeruploader.h.

void bt::PeerUploader::clearAllRequests (  ) 

Clear all pending requests.

Definition at line 103 of file peeruploader.cpp.

Uint32 bt::PeerUploader::getNumRequests (  )  const

Get the number of requests.

Definition at line 120 of file peeruploader.cpp.

void bt::PeerUploader::removeRequest ( const Request &  r  ) 

Remove a Request from the list of Requests.

Parameters:
r The Request

Definition at line 52 of file peeruploader.cpp.

Uint32 bt::PeerUploader::update ( ChunkManager &  cman,
Uint32  opt_unchoked 
)

Update the PeerUploader.

This will check if there are Request, and will try to handle them.

Parameters:
cman The ChunkManager
opt_unchoked ID of optimisticly unchoked peer
Returns:
The number of bytes uploaded

Definition at line 60 of file peeruploader.cpp.


The documentation for this class was generated from the following files:
  • peeruploader.h
  • peeruploader.cpp

kget

Skip menu "kget"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdenetwork

Skip menu "kdenetwork"
  • kget
  • kopete
  •   kopete
  •   libkopete
  •       libpapillon
  • krfb
Generated for kdenetwork by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal