]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/conn.h
- new allocated connection structures will be initialized correctly now.
[ngircd-alex.git] / src / ngircd / conn.h
index 5a8d3e10cedd5fa830f635e16f743980c3ce0a40..f553277db3159ba208d91d7369cc1374934e14f2 100644 (file)
@@ -2,16 +2,15 @@
  * ngIRCd -- The Next Generation IRC Daemon
  * Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
  *
- * Dieses Programm ist freie Software. Sie koennen es unter den Bedingungen
- * der GNU General Public License (GPL), wie von der Free Software Foundation
- * herausgegeben, weitergeben und/oder modifizieren, entweder unter Version 2
- * der Lizenz oder (wenn Sie es wuenschen) jeder spaeteren Version.
- * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
- * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * Please read the file COPYING, README and AUTHORS for more information.
  *
- * $Id: conn.h,v 1.19 2002/11/02 22:58:19 alex Exp $
+ * $Id: conn.h,v 1.25 2002/12/12 12:23:43 alex Exp $
  *
- * conn.h: Verwaltung aller Netz-Verbindungen ("connections") (Header)
+ * Connection management (header)
  */
 
 
 #define __conn_h__
 
 
-#include <time.h>
+#include <time.h>                      /* wg. time_t, s.u. */
+
+
+#ifdef USE_ZLIB
+#define CONN_ZIP 4                     /* Kompression mit zlib */
+#endif
 
 
 typedef INT CONN_ID;
@@ -28,6 +32,9 @@ typedef INT CONN_ID;
 GLOBAL VOID Conn_Init PARAMS((VOID ));
 GLOBAL VOID Conn_Exit PARAMS(( VOID ));
 
+GLOBAL INT Conn_InitListeners PARAMS(( VOID ));
+GLOBAL VOID Conn_ExitListeners PARAMS(( VOID ));
+
 GLOBAL BOOLEAN Conn_NewListener PARAMS(( CONST UINT Port ));
 
 GLOBAL VOID Conn_Handler PARAMS(( VOID ));
@@ -40,17 +47,36 @@ GLOBAL VOID Conn_Close PARAMS(( CONN_ID Idx, CHAR *LogMsg, CHAR *FwdMsg, BOOLEAN
 GLOBAL VOID Conn_UpdateIdle PARAMS(( CONN_ID Idx ));
 GLOBAL time_t Conn_GetIdle PARAMS(( CONN_ID Idx ));
 GLOBAL time_t Conn_LastPing PARAMS(( CONN_ID Idx ));
+GLOBAL time_t Conn_StartTime PARAMS(( CONN_ID Idx ));
+GLOBAL INT Conn_SendQ PARAMS(( CONN_ID Idx ));
+GLOBAL INT Conn_RecvQ PARAMS(( CONN_ID Idx ));
+GLOBAL LONG Conn_SendMsg PARAMS(( CONN_ID Idx ));
+GLOBAL LONG Conn_RecvMsg PARAMS(( CONN_ID Idx ));
+GLOBAL LONG Conn_SendBytes PARAMS(( CONN_ID Idx ));
+GLOBAL LONG Conn_RecvBytes PARAMS(( CONN_ID Idx ));
 
 GLOBAL VOID Conn_SetPenalty PARAMS(( CONN_ID Idx, time_t Seconds ));
 GLOBAL VOID Conn_ResetPenalty PARAMS(( CONN_ID Idx ));
 
 GLOBAL VOID Conn_ClearFlags PARAMS(( VOID ));
-GLOBAL BOOLEAN Conn_Flag PARAMS(( CONN_ID Idx ));
-GLOBAL VOID Conn_SetFlag PARAMS(( CONN_ID Idx ));
+GLOBAL INT Conn_Flag PARAMS(( CONN_ID Idx ));
+GLOBAL VOID Conn_SetFlag PARAMS(( CONN_ID Idx, INT Flag ));
+
+GLOBAL VOID Conn_SetServer PARAMS(( CONN_ID Idx, INT ConfServer ));
 
 GLOBAL CONN_ID Conn_First PARAMS(( VOID ));
 GLOBAL CONN_ID Conn_Next PARAMS(( CONN_ID Idx ));
 
+GLOBAL VOID Conn_SetOption PARAMS(( CONN_ID Idx, INT Option ));
+GLOBAL VOID Conn_UnsetOption PARAMS(( CONN_ID Idx, INT Option ));
+GLOBAL INT Conn_Options PARAMS(( CONN_ID Idx ));
+
+#ifdef USE_ZLIB
+GLOBAL BOOLEAN Conn_InitZip PARAMS(( CONN_ID Idx ));
+GLOBAL LONG Conn_SendBytesZip PARAMS(( CONN_ID Idx ));
+GLOBAL LONG Conn_RecvBytesZip PARAMS(( CONN_ID Idx ));
+#endif
+
 
 GLOBAL INT Conn_MaxFD;