]> arthur.barton.de Git - ngircd-alex.git/blob - src/ngircd/conn.h
f2c616436233c220eefa557155e2d99556c6e2bf
[ngircd-alex.git] / src / ngircd / conn.h
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.22 2002/11/22 17:58:19 alex Exp $
13  *
14  * conn.h: Verwaltung aller Netz-Verbindungen ("connections") (Header)
15  */
16
17
18 #ifndef __conn_h__
19 #define __conn_h__
20
21
22 #include <time.h>
23
24
25 typedef INT CONN_ID;
26
27
28 GLOBAL VOID Conn_Init PARAMS((VOID ));
29 GLOBAL VOID Conn_Exit PARAMS(( VOID ));
30
31 GLOBAL INT Conn_InitListeners PARAMS(( VOID ));
32 GLOBAL VOID Conn_ExitListeners PARAMS(( VOID ));
33
34 GLOBAL BOOLEAN Conn_NewListener PARAMS(( CONST UINT Port ));
35
36 GLOBAL VOID Conn_Handler PARAMS(( VOID ));
37
38 GLOBAL BOOLEAN Conn_Write PARAMS(( CONN_ID Idx, CHAR *Data, INT Len ));
39 GLOBAL BOOLEAN Conn_WriteStr PARAMS(( CONN_ID Idx, CHAR *Format, ... ));
40
41 GLOBAL VOID Conn_Close PARAMS(( CONN_ID Idx, CHAR *LogMsg, CHAR *FwdMsg, BOOLEAN InformClient ));
42
43 GLOBAL VOID Conn_UpdateIdle PARAMS(( CONN_ID Idx ));
44 GLOBAL time_t Conn_GetIdle PARAMS(( CONN_ID Idx ));
45 GLOBAL time_t Conn_LastPing PARAMS(( CONN_ID Idx ));
46
47 GLOBAL VOID Conn_SetPenalty PARAMS(( CONN_ID Idx, time_t Seconds ));
48 GLOBAL VOID Conn_ResetPenalty PARAMS(( CONN_ID Idx ));
49
50 GLOBAL VOID Conn_ClearFlags PARAMS(( VOID ));
51 GLOBAL INT Conn_Flag PARAMS(( CONN_ID Idx ));
52 GLOBAL VOID Conn_SetFlag PARAMS(( CONN_ID Idx, INT Flag ));
53
54 GLOBAL VOID Conn_SetServer PARAMS(( CONN_ID Idx, INT ConfServer ));
55
56 GLOBAL CONN_ID Conn_First PARAMS(( VOID ));
57 GLOBAL CONN_ID Conn_Next PARAMS(( CONN_ID Idx ));
58
59
60 GLOBAL INT Conn_MaxFD;
61
62
63 #endif
64
65
66 /* -eof- */