]>
Commit | Line | Data |
---|---|---|
0d0bce6a AR |
1 | /* |
2 | * $Id$ | |
3 | * | |
4 | * DEBUG: section 54 Interprocess Communication | |
5 | * | |
6 | */ | |
7 | ||
8 | #ifndef SQUID_IPC_START_LISTENING_H | |
9 | #define SQUID_IPC_START_LISTENING_H | |
10 | ||
11 | #include <iosfwd> | |
12 | #include "ipc/FdNotes.h" | |
13 | #include "base/AsyncCall.h" | |
14 | ||
15 | class IpAddress; | |
16 | ||
17 | namespace Ipc | |
18 | { | |
19 | ||
20 | /// common API for all StartListening() callbacks | |
21 | class StartListeningCb | |
22 | { | |
23 | public: | |
24 | StartListeningCb(); | |
25 | virtual ~StartListeningCb(); | |
26 | ||
27 | /// starts printing arguments, return os | |
28 | std::ostream &startPrint(std::ostream &os) const; | |
29 | ||
30 | public: | |
31 | int fd; ///< opened listening socket or -1 | |
32 | int errNo; ///< errno value from the comm_open_listener() call | |
33 | }; | |
34 | ||
35 | /// Depending on whether SMP is on, either ask Coordinator to send us | |
36 | /// the listening FD or call comm_open_listener() directly. | |
37 | extern void StartListening(int sock_type, int proto, IpAddress &addr, | |
5667a628 | 38 | int flags, FdNoteId fdNote, AsyncCall::Pointer &callback); |
0d0bce6a AR |
39 | |
40 | } // namespace Ipc; | |
41 | ||
42 | ||
43 | #endif /* SQUID_IPC_START_LISTENING_H */ |