* (at your option) any later version.
* Please read the file COPYING, README and AUTHORS for more information.
*
- * $Id: conn.h,v 1.41 2006/04/23 10:37:27 fw Exp $
+ * $Id: conn.h,v 1.46 2008/02/26 22:04:17 fw Exp $
*
* Connection management (header)
*/
#include "defines.h"
#include "resolve.h"
#include "array.h"
+#include "tool.h"
+#include "ng_ipaddr.h"
#ifdef ZLIB
#include <zlib.h>
typedef struct _Connection
{
int sock; /* Socket handle */
- struct sockaddr_in addr; /* Client address */
+ ng_ipaddr_t addr; /* Client address */
RES_STAT res_stat; /* Status of resolver process */
char host[HOST_LEN]; /* Hostname */
array rbuf; /* Read buffer */
array wbuf; /* Write buffer */
+ time_t signon; /* Signon ("connect") time */
time_t lastdata; /* Last activity */
time_t lastping; /* Last PING */
time_t lastprivmsg; /* Last PRIVMSG */
GLOBAL void Conn_Init PARAMS((void ));
GLOBAL void Conn_Exit PARAMS(( void ));
-GLOBAL int Conn_InitListeners PARAMS(( void ));
+GLOBAL unsigned int Conn_InitListeners PARAMS(( void ));
GLOBAL void Conn_ExitListeners PARAMS(( void ));
GLOBAL void Conn_Handler PARAMS(( void ));
-GLOBAL bool Conn_Write PARAMS(( CONN_ID Idx, char *Data, unsigned int Len ));
GLOBAL bool Conn_WriteStr PARAMS(( CONN_ID Idx, char *Format, ... ));
GLOBAL void Conn_Close PARAMS(( CONN_ID Idx, char *LogMsg, char *FwdMsg, bool InformClient ));