X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Fconn.h;h=5a8d3e10cedd5fa830f635e16f743980c3ce0a40;hp=02b744ef5f0fad386ac462144b03e58cf2409b94;hb=05839597bf9cc74b0e390ad5c6a6b747697f7abe;hpb=7c91951d74f0590c4135fa1d2517c739b14771f6 diff --git a/src/ngircd/conn.h b/src/ngircd/conn.h index 02b744ef..5a8d3e10 100644 --- a/src/ngircd/conn.h +++ b/src/ngircd/conn.h @@ -1,36 +1,17 @@ /* * ngIRCd -- The Next Generation IRC Daemon - * Copyright (c)2001 by Alexander Barton (alex@barton.de) + * 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 comBase beteiligten Autoren finden Sie in der Datei AUTHORS. + * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS. * - * $Id: conn.h,v 1.6 2001/12/25 22:03:47 alex Exp $ + * $Id: conn.h,v 1.19 2002/11/02 22:58:19 alex Exp $ * * conn.h: Verwaltung aller Netz-Verbindungen ("connections") (Header) - * - * $Log: conn.h,v $ - * 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. */ @@ -38,20 +19,40 @@ #define __conn_h__ +#include + + typedef INT CONN_ID; -GLOBAL VOID Conn_Init( VOID ); -GLOBAL VOID Conn_Exit( VOID ); +GLOBAL VOID Conn_Init PARAMS((VOID )); +GLOBAL VOID Conn_Exit 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_Close PARAMS(( CONN_ID Idx, CHAR *LogMsg, CHAR *FwdMsg, BOOLEAN InformClient )); + +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 VOID Conn_SetPenalty PARAMS(( CONN_ID Idx, time_t Seconds )); +GLOBAL VOID Conn_ResetPenalty PARAMS(( CONN_ID Idx )); -GLOBAL BOOLEAN Conn_New_Listener( CONST INT Port ); +GLOBAL VOID Conn_ClearFlags PARAMS(( VOID )); +GLOBAL BOOLEAN Conn_Flag PARAMS(( CONN_ID Idx )); +GLOBAL VOID Conn_SetFlag PARAMS(( CONN_ID Idx )); -GLOBAL VOID Conn_Handler( INT Timeout ); +GLOBAL CONN_ID Conn_First PARAMS(( VOID )); +GLOBAL CONN_ID Conn_Next 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_Close( CONN_ID Idx, CHAR *Msg ); +GLOBAL INT Conn_MaxFD; #endif