* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * InspIRCd: (C) 2002-2008 InspIRCd Development Team
* See: http://www.inspircd.org/wiki/index.php/Credits
*
* This program is free but copyrighted software; see
*/
int fd;
public:
+
/** Get the current file descriptor
* @return The file descriptor of this handler
*/
int CurrentSetSize;
/** Reference table, contains all current handlers
*/
- EventHandler* ref[MAX_DESCRIPTORS];
+ 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;
+ double ReadEvents;
+ double WriteEvents;
+ double ErrorEvents;
+
/** Constructor.
* The constructor transparently initializes
* the socket engine which the ircd is using.
*/
virtual int Shutdown(EventHandler* fd, int how);
- /** Abstraction for BSD sockets shutdownt(2).
+ /** Abstraction for BSD sockets shutdown(2).
* This function should emulate its namesake system call exactly.
* @return This method should return exactly the same values as the system call it emulates.
*/
* 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