#include <socketmonitor.h>
|
enum | GroupType { UPLOAD_GROUP,
DOWNLOAD_GROUP
} |
|
typedef std::list< TrafficShapedSocket * >::iterator | Itr |
|
|
static Uint32 | getDownloadCap () |
|
static Uint32 | getUploadCap () |
|
static SocketMonitor & | instance () |
|
static void | setDownloadCap (Uint32 bytes_per_sec) |
|
static void | setSleepTime (Uint32 sleep_time) |
|
static void | setUploadCap (Uint32 bytes_per_sec) |
|
- Author
- Joris Guisson joris.nosp@m..gui.nosp@m.sson@.nosp@m.gmai.nosp@m.l.com
Monitors all sockets for upload and download traffic. It uses two threads to do this.
Definition at line 44 of file socketmonitor.h.
◆ newGroup()
Uint32 net::SocketMonitor::newGroup |
( |
GroupType |
type, |
|
|
Uint32 |
limit, |
|
|
Uint32 |
assured_rate |
|
) |
| |
Creata a new upload or download group
- Parameters
-
type | Whether it is an upload or download group |
limit | Limit of group in bytes/s |
assured_rate | The assured rate in bytes/s |
- Returns
- The group ID
◆ removeGroup()
void net::SocketMonitor::removeGroup |
( |
GroupType |
type, |
|
|
Uint32 |
gid |
|
) |
| |
Remove a group
- Parameters
-
type | The group type |
gid | The group id |
◆ setGroupAssuredRate()
void net::SocketMonitor::setGroupAssuredRate |
( |
GroupType |
type, |
|
|
Uint32 |
gid, |
|
|
Uint32 |
as |
|
) |
| |
Change the group assured rate
- Parameters
-
type | The group type |
gid | The group id |
limit | The limit |
◆ setGroupLimit()
void net::SocketMonitor::setGroupLimit |
( |
GroupType |
type, |
|
|
Uint32 |
gid, |
|
|
Uint32 |
limit |
|
) |
| |
Change the group limit
- Parameters
-
type | The group type |
gid | The group id |
limit | The limit |
◆ shutdown()
void net::SocketMonitor::shutdown |
( |
| ) |
|
Shutdown the socketmonitor and all the networking threads.
The documentation for this class was generated from the following file: