]> git.ipfire.org Git - thirdparty/squid.git/blob - src/ipc/StartListening.h
Cleanup: un-wrap C++ header includes
[thirdparty/squid.git] / src / ipc / StartListening.h
1 /*
2 * DEBUG: section 54 Interprocess Communication
3 *
4 */
5
6 #ifndef SQUID_IPC_START_LISTENING_H
7 #define SQUID_IPC_START_LISTENING_H
8
9 #include "base/AsyncCall.h"
10 #include "base/Subscription.h"
11 #include "comm/forward.h"
12 #include "ip/forward.h"
13 #include "ipc/FdNotes.h"
14
15 #include <iosfwd>
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 Comm::ConnectionPointer conn; ///< opened listening socket
32 int errNo; ///< errno value from the comm_open_listener() call
33 Subscription::Pointer handlerSubscription; ///< The subscription we will pass on to the ConnAcceptor
34 };
35
36 /// Depending on whether SMP is on, either ask Coordinator to send us
37 /// the listening FD or open a listening socket directly.
38 void StartListening(int sock_type, int proto, const Comm::ConnectionPointer &listenConn,
39 FdNoteId fdNote, AsyncCall::Pointer &callback);
40
41 } // namespace Ipc;
42
43 #endif /* SQUID_IPC_START_LISTENING_H */