7e83d8c295d08335bf8916acec3720f5bd4ab2ca
[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_CHECK_FUNCS([usleep select socket inet_pton inet_ntop])
21  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])
22  
23  AC_CHECK_LIB(ws2_32, main, [ LIBS="$LIBS -lws2_32" ], [])
24  AC_CHECK_LIB(ssl, SSL_read, [
25    AC_CHECK_LIB(crypto, X509_new, [
26      AC_CHECK_HEADERS(openssl/ssl.h openssl/err.h openssl/rand.h, [
27        LIBS="$LIBS -lssl -lcrypto"
28      ])
29    ])
30  ])
31  AC_CHECK_LIB(pthread, pthread_create, [
32    AC_CHECK_HEADERS(pthread.h, [
33      LIBS="$LIBS -lpthread"
34    ])
35  ])
36  AC_CHECK_LIB(cares, ares_init, [
37    AC_CHECK_HEADERS(ares.h, [
38      LIBS="$LIBS -lcares"
39    ])
40  ])
41 */
42 // configure config file
43 #include "../../config.h"
44
45 #define IOHANDLER_MAX_SOCKETS 1024
46 #define IOHANDLER_LOOP_MAXTIME 100000 /* 100ms */
47
48 #define IOSOCKET_PARSE_DELIMITERS_COUNT 5
49 #define IOSOCKET_PARSE_LINE_LIMIT 1024
50 #define IOSOCKET_PRINTF_LINE_LEN  1024
51
52 //#define IODNS_USE_THREADS
53
54 #define IOGC_TIMEOUT 60