]>
Commit | Line | Data |
---|---|---|
0d0bce6a | 1 | /* |
bde978a6 | 2 | * Copyright (C) 1996-2015 The Squid Software Foundation and contributors |
0d0bce6a | 3 | * |
bbc27441 AJ |
4 | * Squid software is distributed under GPLv2+ license and includes |
5 | * contributions from numerous individuals and organizations. | |
6 | * Please see the COPYING and CONTRIBUTORS files for details. | |
0d0bce6a AR |
7 | */ |
8 | ||
bbc27441 AJ |
9 | /* DEBUG: section 54 Interprocess Communication */ |
10 | ||
0d0bce6a AR |
11 | #ifndef SQUID_IPC_START_LISTENING_H |
12 | #define SQUID_IPC_START_LISTENING_H | |
13 | ||
602d9612 | 14 | #include "base/AsyncCall.h" |
e0d28505 AJ |
15 | #include "base/Subscription.h" |
16 | #include "comm/forward.h" | |
a67d2b2e | 17 | #include "ip/forward.h" |
0d0bce6a | 18 | #include "ipc/FdNotes.h" |
0d0bce6a | 19 | |
055421ee | 20 | #include <iosfwd> |
055421ee | 21 | |
0d0bce6a AR |
22 | namespace Ipc |
23 | { | |
24 | ||
25 | /// common API for all StartListening() callbacks | |
26 | class StartListeningCb | |
27 | { | |
28 | public: | |
29 | StartListeningCb(); | |
30 | virtual ~StartListeningCb(); | |
31 | ||
32 | /// starts printing arguments, return os | |
33 | std::ostream &startPrint(std::ostream &os) const; | |
34 | ||
35 | public: | |
e0d28505 | 36 | Comm::ConnectionPointer conn; ///< opened listening socket |
0d0bce6a | 37 | int errNo; ///< errno value from the comm_open_listener() call |
e0d28505 | 38 | Subscription::Pointer handlerSubscription; ///< The subscription we will pass on to the ConnAcceptor |
0d0bce6a AR |
39 | }; |
40 | ||
41 | /// Depending on whether SMP is on, either ask Coordinator to send us | |
8bbb16e3 | 42 | /// the listening FD or open a listening socket directly. |
82afb125 | 43 | void StartListening(int sock_type, int proto, const Comm::ConnectionPointer &listenConn, |
55ca4440 | 44 | FdNoteId fdNote, AsyncCall::Pointer &callback); |
0d0bce6a AR |
45 | |
46 | } // namespace Ipc; | |
47 | ||
0d0bce6a | 48 | #endif /* SQUID_IPC_START_LISTENING_H */ |
f53969cc | 49 |