*/
unsigned long recvqmax;
+ /** Seconds worth of penalty before penalty system activates
+ */
+ unsigned long penaltythreshold;
+
/** Local max when connecting by this connection class
*/
unsigned long maxlocal;
return (recvqmax ? recvqmax : 4096);
}
+ /** Returns the penalty threshold value
+ */
+ unsigned long GetPenaltyThreshold()
+ {
+ return penaltythreshold;
+ }
+
/** Returusn the maximum number of local sessions
*/
unsigned long GetMaxLocal()
me->softsendqmax = tag->getInt("softsendq", me->softsendqmax);
me->hardsendqmax = tag->getInt("hardsendq", me->hardsendqmax);
me->recvqmax = tag->getInt("recvq", me->recvqmax);
+ me->penaltythreshold = tag->getInt("threshold", me->penaltythreshold);
me->maxlocal = tag->getInt("localmax", me->maxlocal);
me->maxglobal = tag->getInt("globalmax", me->maxglobal);
me->port = tag->getInt("port", me->port);
ConnectClass::ConnectClass(ConfigTag* tag, char t, const std::string& mask)
: config(tag), type(t), name("unnamed"), registration_timeout(0), host(mask),
pingtime(0), pass(""), hash(""), softsendqmax(0), hardsendqmax(0),
- recvqmax(0), maxlocal(0), maxglobal(0), maxchans(0), port(0), limit(0)
+ recvqmax(0), penaltythreshold(0), maxlocal(0), maxglobal(0), maxchans(0), port(0), limit(0)
{
}
registration_timeout(parent.registration_timeout), host(mask),
pingtime(parent.pingtime), pass(parent.pass), hash(parent.hash),
softsendqmax(parent.softsendqmax), hardsendqmax(parent.hardsendqmax),
- recvqmax(parent.recvqmax), maxlocal(parent.maxlocal),
+ recvqmax(parent.recvqmax), penaltythreshold(parent.penaltythreshold), maxlocal(parent.maxlocal),
maxglobal(parent.maxglobal), maxchans(parent.maxchans),
port(parent.port), limit(parent.limit)
{
softsendqmax = src->softsendqmax;
hardsendqmax = src->hardsendqmax;
recvqmax = src->recvqmax;
+ penaltythreshold = src->penaltythreshold;
maxlocal = src->maxlocal;
maxglobal = src->maxglobal;
limit = src->limit;