]>
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
12 #include "SquidString.h"
13 #include "ipc/UdsOp.h"
20 /// Waits for and receives incoming IPC messages; kids handle the messages
21 class Port
: public UdsOp
24 Port(const String
&aListenAddr
);
25 /// calculates IPC message address for strand #id at path
26 static String
MakeAddr(const char *path
, int id
);
29 virtual void start() = 0; // UdsOp (AsyncJob) API; has body
30 virtual bool doneAll() const; // UdsOp (AsyncJob) API
32 /// read the next incoming message
35 /// handle IPC message just read
36 virtual void receive(const TypedMsgHdr
& message
) = 0;
39 void noteRead(const CommIoCbParams
¶ms
); // Comm callback API
42 TypedMsgHdr buf
; ///< msghdr struct filled by Comm
46 extern const char coordinatorAddr
[]; ///< where coordinator listens
47 extern const char strandAddrPfx
[]; ///< strand's listening address prefix
52 #endif /* SQUID_IPC_PORT_H */