Blob


1 /*
2 * ngIRCd -- The Next Generation IRC Daemon
3 * Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
4 *
5 * Dieses Programm ist freie Software. Sie koennen es unter den Bedingungen
6 * der GNU General Public License (GPL), wie von der Free Software Foundation
7 * herausgegeben, weitergeben und/oder modifizieren, entweder unter Version 2
8 * der Lizenz oder (wenn Sie es wuenschen) jeder spaeteren Version.
9 * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
10 * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
11 *
12 * $Id: conn.h,v 1.17 2002/08/26 00:03:15 alex Exp $
13 *
14 * conn.h: Verwaltung aller Netz-Verbindungen ("connections") (Header)
15 */
18 #ifndef __conn_h__
19 #define __conn_h__
22 #include <time.h>
25 typedef INT CONN_ID;
28 GLOBAL VOID Conn_Init PARAMS((VOID ));
29 GLOBAL VOID Conn_Exit PARAMS(( VOID ));
31 GLOBAL BOOLEAN Conn_NewListener PARAMS(( CONST UINT Port ));
33 GLOBAL VOID Conn_Handler PARAMS(( VOID ));
35 GLOBAL BOOLEAN Conn_Write PARAMS(( CONN_ID Idx, CHAR *Data, INT Len ));
36 GLOBAL BOOLEAN Conn_WriteStr PARAMS(( CONN_ID Idx, CHAR *Format, ... ));
38 GLOBAL VOID Conn_Close PARAMS(( CONN_ID Idx, CHAR *LogMsg, CHAR *FwdMsg, BOOLEAN InformClient ));
40 GLOBAL VOID Conn_UpdateIdle PARAMS(( CONN_ID Idx ));
41 GLOBAL time_t Conn_GetIdle PARAMS(( CONN_ID Idx ));
42 GLOBAL time_t Conn_LastPing PARAMS(( CONN_ID Idx ));
44 GLOBAL VOID Conn_SetPenalty PARAMS(( CONN_ID Idx, time_t Seconds ));
47 GLOBAL INT Conn_MaxFD;
50 #endif
53 /* -eof- */