]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/ipc/Port.h
4 * DEBUG: section 54 Interprocess Communication
8 #ifndef SQUID_IPC_PORT_H
9 #define SQUID_IPC_PORT_H
11 #include "SquidString.h"
12 #include "ipc/UdsOp.h"
17 /// Waits for and receives incoming IPC messages; kids handle the messages
18 class Port
: public UdsOp
21 Port(const String
&aListenAddr
);
22 /// calculates IPC message address for strand #id at path
23 static String
MakeAddr(const char *path
, int id
);
26 virtual void start() = 0; // UdsOp (AsyncJob) API; has body
27 virtual bool doneAll() const; // UdsOp (AsyncJob) API
29 /// read the next incoming message
32 /// handle IPC message just read
33 virtual void receive(const TypedMsgHdr
& message
) = 0;
36 void noteRead(const CommIoCbParams
¶ms
); // Comm callback API
39 TypedMsgHdr buf
; ///< msghdr struct filled by Comm
42 extern const char coordinatorAddr
[]; ///< where coordinator listens
43 extern const char strandAddrPfx
[]; ///< strand's listening address prefix
47 #endif /* SQUID_IPC_PORT_H */