aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/internal.h')
-rw-r--r--src/microhttpd/internal.h25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h
index 9db32af1..a9f5e141 100644
--- a/src/microhttpd/internal.h
+++ b/src/microhttpd/internal.h
@@ -43,6 +43,13 @@
43#include <stdbool.h> 43#include <stdbool.h>
44#endif 44#endif
45 45
46#ifdef HAVE_INTTYPES_H
47#include <inttypes.h>
48#endif /* HAVE_INTTYPES_H */
49
50#ifndef PRIu64
51#define PRIu64 "llu"
52#endif /* ! PRIu64 */
46 53
47#ifdef MHD_PANIC 54#ifdef MHD_PANIC
48/* Override any defined MHD_PANIC macro with proper one */ 55/* Override any defined MHD_PANIC macro with proper one */
@@ -1143,13 +1150,14 @@ struct MHD_Connection
1143 * Last time this connection had any activity 1150 * Last time this connection had any activity
1144 * (reading or writing). 1151 * (reading or writing).
1145 */ 1152 */
1146 time_t last_activity; 1153 uint64_t last_activity;
1147 1154
1148 /** 1155 /**
1149 * After how many seconds of inactivity should 1156 * After how many milliseconds of inactivity should
1150 * this connection time out? Zero for no timeout. 1157 * this connection time out?
1158 * Zero for no timeout.
1151 */ 1159 */
1152 time_t connection_timeout; 1160 uint64_t connection_timeout_ms;
1153 1161
1154 /** 1162 /**
1155 * Special member to be returned by #MHD_get_connection_info() 1163 * Special member to be returned by #MHD_get_connection_info()
@@ -1707,7 +1715,7 @@ struct MHD_Daemon
1707 * moved back to the tail of the list. 1715 * moved back to the tail of the list.
1708 * 1716 *
1709 * All connections by default start in this list; if a custom 1717 * All connections by default start in this list; if a custom
1710 * timeout that does not match @e connection_timeout is set, they 1718 * timeout that does not match @e connection_timeout_ms is set, they
1711 * are moved to the @e manual_timeout_head-XDLL. 1719 * are moved to the @e manual_timeout_head-XDLL.
1712 * Not used in MHD_USE_THREAD_PER_CONNECTION mode as each thread 1720 * Not used in MHD_USE_THREAD_PER_CONNECTION mode as each thread
1713 * needs only one connection-specific timeout. 1721 * needs only one connection-specific timeout.
@@ -1968,10 +1976,11 @@ struct MHD_Daemon
1968 unsigned int connection_limit; 1976 unsigned int connection_limit;
1969 1977
1970 /** 1978 /**
1971 * After how many seconds of inactivity should 1979 * After how many milliseconds of inactivity should
1972 * connections time out? Zero for no timeout. 1980 * this connection time out?
1981 * Zero for no timeout.
1973 */ 1982 */
1974 time_t connection_timeout; 1983 uint64_t connection_timeout_ms;
1975 1984
1976 /** 1985 /**
1977 * Maximum number of connections per IP, or 0 for 1986 * Maximum number of connections per IP, or 0 for