libktorrent
2.2.0
|
#include <downloadthread.h>
Public Member Functions | |
DownloadThread (SocketMonitor *sm) | |
void | wakeUp () |
Wake up the download thread. | |
![]() | |
NetworkThread (SocketMonitor *sm) | |
void | addGroup (Uint32 gid, Uint32 limit, Uint32 assured_rate) |
bool | isRunning () const |
Is the thread running. | |
void | removeGroup (Uint32 gid) |
void | run () override |
void | setGroupAssuredRate (Uint32 gid, Uint32 as) |
void | setGroupLimit (Uint32 gid, Uint32 limit) |
void | stop () |
Stop before the next update. | |
![]() | |
int | add (int fd, Mode mode) |
Add a file descriptor to the poll (returns the index of it) | |
int | add (PollClient::Ptr pc) |
Add a poll client. | |
int | poll (int timeout=-1) |
Poll all sockets. | |
bool | ready (int index, Mode mode) const |
Check if a socket at an index is read. | |
void | reset () |
Reset the poll. | |
Static Public Member Functions | |
static Uint32 | cap () |
Get the download cap. | |
static void | setCap (bt::Uint32 cap) |
Set the download cap. | |
static void | setSleepTime (bt::Uint32 stime) |
Set the sleep time when using download caps. | |
Additional Inherited Members | |
![]() | |
enum | Mode { INPUT, OUTPUT } |
![]() | |
void | doGroups (Uint32 num_ready, bt::TimeStamp now, bt::Uint32 limit) |
![]() | |
bt::PtrMap< Uint32, SocketGroup > | groups |
bt::TimeStamp | prev_run_time |
bool | running |
SocketMonitor * | sm |
Thread which processes incoming data
Definition at line 53 of file downloadthread.h.