]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/ipc/Port.h
2 * DEBUG: section 54 Interprocess Communication
6 #ifndef SQUID_IPC_PORT_H
7 #define SQUID_IPC_PORT_H
9 #include "SquidString.h"
10 #include "ipc/UdsOp.h"
15 /// Waits for and receives incoming IPC messages; kids handle the messages
16 class Port
: public UdsOp
19 Port(const String
&aListenAddr
);
20 /// calculates IPC message address for strand #id at path
21 static String
MakeAddr(const char *path
, int id
);
24 virtual void start() = 0; // UdsOp (AsyncJob) API; has body
25 virtual bool doneAll() const; // UdsOp (AsyncJob) API
27 /// read the next incoming message
30 /// handle IPC message just read
31 virtual void receive(const TypedMsgHdr
& message
) = 0;
34 void noteRead(const CommIoCbParams
¶ms
); // Comm callback API
37 TypedMsgHdr buf
; ///< msghdr struct filled by Comm
40 extern const char coordinatorAddr
[]; ///< where coordinator listens
41 extern const char strandAddrPfx
[]; ///< strand's listening address prefix
45 #endif /* SQUID_IPC_PORT_H */