]> git.ipfire.org Git - thirdparty/squid.git/blame - src/ipc/StartListening.h
Applied source formatting rules in preparation for trunk merge.
[thirdparty/squid.git] / src / ipc / StartListening.h
CommitLineData
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
15class IpAddress;
16
17namespace Ipc
18{
19
20/// common API for all StartListening() callbacks
21class StartListeningCb
22{
23public:
24 StartListeningCb();
25 virtual ~StartListeningCb();
26
27 /// starts printing arguments, return os
28 std::ostream &startPrint(std::ostream &os) const;
29
30public:
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.
37extern 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 */