summaryrefslogtreecommitdiff
path: root/include/users.h
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-26 16:41:07 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-26 16:41:07 +0000
commit7107ec12d8640d35cfe3d5002db1bc1deb33625d (patch)
tree72597b00288c0d895880e24a97cadb8a178b5517 /include/users.h
parentee913368d7162dbe0dd119091f8b468eb7be0f1a (diff)
Flexible SendQ
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11766 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/users.h')
-rw-r--r--include/users.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/include/users.h b/include/users.h
index 763d45c57..76337b2c3 100644
--- a/include/users.h
+++ b/include/users.h
@@ -93,8 +93,14 @@ struct CoreExport ConnectClass : public classbase
std::string hash;
/** Maximum size of sendq for users in this class (bytes)
+ * Users cannot send commands if they go over this limit
*/
- unsigned long sendqmax;
+ unsigned long softsendqmax;
+
+ /** Maximum size of sendq for users in this class (bytes)
+ * Users are killed if they go over this limit
+ */
+ unsigned long hardsendqmax;
/** Maximum size of recvq for users in this class (bytes)
*/
@@ -157,11 +163,19 @@ struct CoreExport ConnectClass : public classbase
return (pingtime ? pingtime : 120);
}
- /** Returns the maximum sendq value
+ /** Returns the maximum sendq value (soft limit)
+ * Note that this is in addition to internal OS buffers
+ */
+ unsigned long GetSendqSoftMax()
+ {
+ return (softsendqmax ? softsendqmax : 4096);
+ }
+
+ /** Returns the maximum sendq value (hard limit)
*/
- unsigned long GetSendqMax()
+ unsigned long GetSendqHardMax()
{
- return (sendqmax ? sendqmax : 262114);
+ return (hardsendqmax ? hardsendqmax : 0x100000);
}
/** Returns the maximum recvq value