]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/comm/Loops.h
1 #ifndef _SQUID_SRC_COMM_LOOPS_H
2 #define _SQUID_SRC_COMM_LOOPS_H
4 #include "comm_err_t.h"
9 /* Comm layer select loops API.
11 * These API functions must be implemented by all FD IO loops used by Squid.
12 * Defines are provided short-term for legacy code. These will disappear soon.
18 /// Initialize the module on Squid startup
19 void SelectLoopInit(void);
21 /// Mark an FD to be watched for its IO status.
22 void SetSelect(int, unsigned int, PF
*, void *, time_t);
24 /// reset/undo/unregister the watch for an FD which was set by Comm::SetSelect()
25 void ResetSelect(int);
27 /** Perform a select() or equivalent call.
28 * This is used by the main select loop engine to check for FD with IO available.
30 comm_err_t
DoSelect(int);
32 void QuickPollRequired(void);
35 * Max number of UDP messages to receive per call to the UDP receive poller.
36 * This is a per-port limit for ICP/HTCP ports.
37 * DNS has a separate limit.
40 #define INCOMING_UDP_MAX 1
42 #define INCOMING_UDP_MAX 15
46 * Max number of DNS messages to receive per call to DNS read handler
49 #define INCOMING_DNS_MAX 1
51 #define INCOMING_DNS_MAX 15
55 * Max number of new TCP connections to accept per call to the TCP listener poller.
56 * This is a per-port limit for HTTP/HTTPS ports.
59 #define INCOMING_TCP_MAX 1
61 #define INCOMING_TCP_MAX 10
63 #define INCOMING_TOTAL_MAX (INCOMING_TCP_MAX+INCOMING_UDP_MAX+INCOMING_DNS_MAX)
67 #endif /* _SQUID_SRC_COMM_LOOPS_H */