From 7107ec12d8640d35cfe3d5002db1bc1deb33625d Mon Sep 17 00:00:00 2001 From: danieldg Date: Sat, 26 Sep 2009 16:41:07 +0000 Subject: Flexible SendQ git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11766 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/users.h | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'include/users.h') 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 -- cgit v1.2.3