summaryrefslogtreecommitdiff
path: root/include/socketengine.h
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-06-18 20:27:47 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-06-18 20:27:47 +0000
commita3802dee4bdfcf3dc11df09c59e6ed1912fbadd9 (patch)
tree0c8a3cc293f02828aebedbbb1f5228cd627f3b2a /include/socketengine.h
parented6fcd4a50f3a0d84ae07a8a0011b193e00cf088 (diff)
Measure bandwidth statistics from the socket engine (kiloBITS per second in, out, total) and display them in /stats z plus send them via the named pipe to the windows gui
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9918 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/socketengine.h')
-rw-r--r--include/socketengine.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/socketengine.h b/include/socketengine.h
index f647f4df3..f16ec3fea 100644
--- a/include/socketengine.h
+++ b/include/socketengine.h
@@ -170,6 +170,12 @@ protected:
EventHandler** ref;
int MAX_DESCRIPTORS;
+
+ size_t indata;
+ size_t outdata;
+ time_t lastempty;
+
+ void UpdateStats(size_t len_in, size_t len_out);
public:
double TotalEvents;
@@ -396,6 +402,10 @@ public:
* the shell or operating system on fatal error.
*/
virtual void RecoverFromFork();
+
+ /** Get data transfer statistics, kilobits per second in and out and total.
+ */
+ void GetStats(float &kbitpersec_in, float &kbitpersec_out, float &kbitpersec_total);
};
#endif