20 #ifndef NETSOCKETGROUP_H
21 #define NETSOCKETGROUP_H
24 #include <util/constants.h>
30 class TrafficShapedSocket;
39 std::list<TrafficShapedSocket*> sockets;
40 bt::TimeStamp prev_run_time;
41 Uint32 group_allowance;
59 bool download(Uint32 & global_allowance,bt::TimeStamp now);
67 bool upload(Uint32 & global_allowance,bt::TimeStamp now);
95 void processUnlimited(
bool up,bt::TimeStamp now);
96 bool processLimited(
bool up,bt::TimeStamp now,Uint32 & allowance);
97 bool process(
bool up,bt::TimeStamp now,Uint32 & global_allowance);