]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/conn.h
- neue Befehle: Conn_StartTime(), Conn_SendQ(), Conn_RecvQ(), Conn_SendMsg(),
[ngircd-alex.git] / src / ngircd / conn.h
index 2e0ac8eb4644285e0f3d62e9c7a6bd8404086b3f..2980157780d80412277f60c6396a12d875a753b0 100644 (file)
@@ -9,39 +9,9 @@
  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
  * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
  *
- * $Id: conn.h,v 1.9 2002/01/02 02:44:36 alex Exp $
+ * $Id: conn.h,v 1.24 2002/12/02 13:19:37 alex Exp $
  *
  * conn.h: Verwaltung aller Netz-Verbindungen ("connections") (Header)
- *
- * $Log: conn.h,v $
- * Revision 1.9  2002/01/02 02:44:36  alex
- * - neue Defines fuer max. Anzahl Server und Operatoren.
- *
- * Revision 1.8  2001/12/31 02:18:51  alex
- * - viele neue Befehle (WHOIS, ISON, OPER, DIE, RESTART),
- * - neuen Header "defines.h" mit (fast) allen Konstanten.
- * - Code Cleanups und viele "kleine" Aenderungen & Bugfixes.
- *
- * Revision 1.7  2001/12/26 14:45:37  alex
- * - "Code Cleanups".
- *
- * Revision 1.6  2001/12/25 22:03:47  alex
- * - Conn_Close() eingefuehrt: war die lokale Funktion Close_Connection().
- *
- * Revision 1.5  2001/12/23 21:57:48  alex
- * - Conn_WriteStr() unterstuetzt nun variable Parameter.
- *
- * Revision 1.4  2001/12/15 00:08:27  alex
- * - neue globale Funktionen: Conn_Write() und Conn_WriteStr().
- *
- * Revision 1.3  2001/12/14 08:15:45  alex
- * - CONN_ID wird definiert.
- *
- * Revision 1.2  2001/12/13 01:33:32  alex
- * - Conn_Handler() unterstuetzt nun einen Timeout (in Sekunden).
- *
- * Revision 1.1  2001/12/12 17:18:38  alex
- * - Modul zur Verwaltung aller Netzwerk-Verbindungen begonnen.
  */
 
 
 #define __conn_h__
 
 
+#include <time.h>                      /* wg. time_t, s.u. */
+
+
+#ifdef USE_ZLIB
+#define CONN_ZIP 4                     /* Kompression mit zlib */
+#endif
+
+
 typedef INT CONN_ID;
 
-typedef struct _Res_Stat
-{
-       INT pid;                        /* PID des Child-Prozess */
-       INT pipe[2];                    /* Pipe fuer IPC */
-} RES_STAT;
 
+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 ));
+
+GLOBAL BOOLEAN Conn_Write PARAMS(( CONN_ID Idx, CHAR *Data, INT Len ));
+GLOBAL BOOLEAN Conn_WriteStr PARAMS(( CONN_ID Idx, CHAR *Format, ... ));
 
-GLOBAL VOID Conn_Init( VOID );
-GLOBAL VOID Conn_Exit( VOID );
+GLOBAL VOID Conn_Close PARAMS(( CONN_ID Idx, CHAR *LogMsg, CHAR *FwdMsg, BOOLEAN InformClient ));
 
-GLOBAL BOOLEAN Conn_NewListener( CONST INT Port );
+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_Handler( INT Timeout );
+GLOBAL VOID Conn_SetPenalty PARAMS(( CONN_ID Idx, time_t Seconds ));
+GLOBAL VOID Conn_ResetPenalty PARAMS(( CONN_ID Idx ));
 
-GLOBAL BOOLEAN Conn_Write( CONN_ID Idx, CHAR *Data, INT Len );
-GLOBAL BOOLEAN Conn_WriteStr( CONN_ID Idx, CHAR *Format, ... );
+GLOBAL VOID Conn_ClearFlags PARAMS(( VOID ));
+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 VOID Conn_Close( CONN_ID Idx, CHAR *Msg );
 
-GLOBAL VOID Conn_UpdateIdle( CONN_ID Idx );
-GLOBAL INT32 Conn_GetIdle( CONN_ID Idx );
+GLOBAL INT Conn_MaxFD;
 
 
 #endif