X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fngircd%2Fconn.h;h=0b13896347d70f0d7936779f55ca8d5e4e481d74;hb=20a2ffef88a426c0531eb6d08718e6ca19bdacc8;hp=fdbf570da83bcec6a81207ca04a3b99f97ada96a;hpb=cf2110960058fdd0f58d854a6e878cde6b953dd8;p=ngircd-alex.git diff --git a/src/ngircd/conn.h b/src/ngircd/conn.h index fdbf570d..0b138963 100644 --- a/src/ngircd/conn.h +++ b/src/ngircd/conn.h @@ -1,33 +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.5 2001/12/23 21:57:48 alex Exp $ + * $Id: conn.h,v 1.13 2002/03/12 14:37:52 alex Exp $ * * conn.h: Verwaltung aller Netz-Verbindungen ("connections") (Header) - * - * $Log: conn.h,v $ - * 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. */ @@ -35,19 +19,34 @@ #define __conn_h__ +#include + + 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( VOID ); GLOBAL VOID Conn_Exit( VOID ); -GLOBAL BOOLEAN Conn_New_Listener( CONST INT Port ); +GLOBAL BOOLEAN Conn_NewListener( CONST INT Port ); GLOBAL VOID Conn_Handler( INT Timeout ); 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 *LogMsg, CHAR *FwdMsg, BOOLEAN InformClient ); + +GLOBAL VOID Conn_UpdateIdle( CONN_ID Idx ); +GLOBAL time_t Conn_GetIdle( CONN_ID Idx ); +GLOBAL time_t Conn_LastPing( CONN_ID Idx ); + #endif