From 70246812d3304b7c0ce81e7708c0fd98438ccd49 Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 11 May 2005 21:54:47 +0000 Subject: Added basic sendq stuff - WARNING, there is no configuration yet, this CVS allows sendq's to grow INFINITELY git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1361 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/users.h | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'include/users.h') diff --git a/include/users.h b/include/users.h index 73e1a1173..b747669c9 100644 --- a/include/users.h +++ b/include/users.h @@ -184,12 +184,21 @@ class userrec : public connection */ std::string recvq; + /** User's send queue. + * Lines waiting to be sent are stored here until their buffer is flushed. + */ + std::string sendq; + /** Flood counters */ long lines_in; time_t reset_due; long threshold; + /* Write error string + */ + std::string WriteError; + userrec(); virtual ~userrec() { } @@ -253,7 +262,22 @@ class userrec : public connection * it is ok to read the buffer before calling GetBuffer(). */ std::string GetBuffer(); - + + /** Sets the write error for a connection. This is done because the actual disconnect + * of a client may occur at an inopportune time such as half way through /LIST output. + * The WriteErrors of clients are checked at a more ideal time (in the mainloop) and + * errored clients purged. + */ + void SetWriteError(std::string error); + + /** Returns the write error which last occured on this connection or an empty string + * if none occured. + */ + std::string GetWriteError(); + + void AddWriteBuf(std::string data); + void FlushWriteBuf(); + }; -- cgit v1.2.3