]> git.ipfire.org Git - thirdparty/squid.git/blob - src/comm/Loops.h
Author: Leonid Evdokimov <leon@darkk.net.ru>
[thirdparty/squid.git] / src / comm / Loops.h
1 #ifndef _SQUID_SRC_COMM_LOOPS_H
2 #define _SQUID_SRC_COMM_LOOPS_H
3
4 #include "comm_err_t.h"
5
6 /* Comm layer select loops API.
7 *
8 * These API functions must be implemented by all FD IO loops used by Squid.
9 * Defines are provided short-term for legacy code. These will disappear soon.
10 */
11
12 namespace Comm
13 {
14
15 /// Initialize the module on Squid startup
16 extern void SelectLoopInit(void);
17
18 /// Mark an FD to be watched for its IO status.
19 extern void SetSelect(int, unsigned int, PF *, void *, time_t);
20
21 /// reset/undo/unregister the watch for an FD which was set by Comm::SetSelect()
22 extern void ResetSelect(int);
23
24 /** Perform a select() or equivalent call.
25 * This is used by the main select loop engine to check for FD with IO available.
26 */
27 extern comm_err_t DoSelect(int);
28
29 extern void QuickPollRequired(void);
30
31 } // namespace Comm
32
33 #endif /* _SQUID_SRC_COMM_LOOPS_H */