kget
net::SocketGroup Class Reference
#include <socketgroup.h>
Detailed Description
Definition at line 35 of file socketgroup.h.
Public Member Functions | |
| void | add (BufferedSocket *s) |
| void | calcAllowance (bt::TimeStamp now) |
| void | clear () |
| bool | download (Uint32 &global_allowance, bt::TimeStamp now) |
| Uint32 | getAssuredAllowance () const |
| Uint32 | numSockets () const |
| void | setAssuredRate (Uint32 as) |
| void | setLimit (Uint32 lim) |
| SocketGroup (Uint32 limit, Uint32 assured_rate) | |
| bool | upload (Uint32 &global_allowance, bt::TimeStamp now) |
| virtual | ~SocketGroup () |
Constructor & Destructor Documentation
| net::SocketGroup::SocketGroup | ( | Uint32 | limit, | |
| Uint32 | assured_rate | |||
| ) |
Definition at line 31 of file socketgroup.cpp.
| net::SocketGroup::~SocketGroup | ( | ) | [virtual] |
Definition at line 39 of file socketgroup.cpp.
Member Function Documentation
| void net::SocketGroup::add | ( | BufferedSocket * | s | ) | [inline] |
| void net::SocketGroup::calcAllowance | ( | bt::TimeStamp | now | ) |
Calculate the allowance for this group.
- Parameters:
-
now Current timestamp
Definition at line 118 of file socketgroup.cpp.
| void net::SocketGroup::clear | ( | ) | [inline] |
| bool net::SocketGroup::download | ( | Uint32 & | global_allowance, | |
| bt::TimeStamp | now | |||
| ) |
Process all the sockets in the vector for download.
- Parameters:
-
global_allowance How much the group can do, this will be updated, 0 means no limit now Current time
- Returns:
- true if we can download more data, false otherwise
Definition at line 108 of file socketgroup.cpp.
| Uint32 net::SocketGroup::getAssuredAllowance | ( | ) | const [inline] |
| Uint32 net::SocketGroup::numSockets | ( | ) | const [inline] |
| void net::SocketGroup::setAssuredRate | ( | Uint32 | as | ) | [inline] |
Set the assured rate for the gorup in bytes per sec.
- Parameters:
-
as The assured rate
Definition at line 79 of file socketgroup.h.
| void net::SocketGroup::setLimit | ( | Uint32 | lim | ) | [inline] |
Set the group limit in bytes per sec.
- Parameters:
-
lim The limit
Definition at line 73 of file socketgroup.h.
| bool net::SocketGroup::upload | ( | Uint32 & | global_allowance, | |
| bt::TimeStamp | now | |||
| ) |
Process all the sockets in the vector for upload.
- Parameters:
-
global_allowance How much the group can do, this will be updated, 0 means no limit now Current time
- Returns:
- true if we can upload more data, false otherwise
Definition at line 113 of file socketgroup.cpp.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference