[IOMultiplexerV2] alpha
[NextIRCd.git] / src / IOHandler / IOHandler_config.h
1 /* IOHanlder_config.h - IOMultiplexer
2  * Copyright (C) 2014  Philipp Kreil (pk910)
3  * 
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  * 
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  * 
14  * You should have received a copy of the GNU General Public License 
15  * along with this program. If not, see <http://www.gnu.org/licenses/>. 
16  */
17
18 /* required configure script checks
19  AC_FUNC_MALLOC
20  AC_FUNC_CALLOC
21  AC_CHECK_FUNCS([usleep select socket inet_pton inet_ntop])
22  AC_CHECK_HEADERS([fcntl.h sys/socket.h sys/select.h sys/time.h sys/types.h unistd.h windows.h winsock2.h errno.h sys/epoll.h sys/event.h])
23  
24  AC_CHECK_LIB(ws2_32, main, [ LIBS="$LIBS -lws2_32" ], [])
25  AC_CHECK_LIB(ssl, SSL_read, [
26    AC_CHECK_LIB(crypto, X509_new, [
27      AC_CHECK_HEADERS(openssl/ssl.h openssl/err.h openssl/rand.h, [
28        LIBS="$LIBS -lssl -lcrypto"
29      ])
30    ])
31  ])
32  AC_CHECK_LIB(pthread, pthread_create, [
33    AC_CHECK_HEADERS(pthread.h, [
34      LIBS="$LIBS -lpthread"
35    ])
36  ])
37 */
38 // configure config file
39 #include "../../config.h"
40
41 #define IOHANDLER_MAX_SOCKETS 1024
42 #define IOHANDLER_LOOP_MAXTIME 100000 /* 100ms */
43
44 #define IOSOCKET_PARSE_DELIMITERS_COUNT 5
45 #define IOSOCKET_PARSE_LINE_LIMIT 1024
46 #define IOSOCKET_PRINTF_LINE_LEN  1024
47
48 //#define IODNS_USE_THREADS
49
50 #define IOGC_TIMEOUT 60