]>
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
10 #include "SquidString.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 of processLabel type
21 static String
MakeAddr(const char *proccessLabel
, int id
);
23 /// get the IPC message address for coordinator process
24 static String
CoordinatorAddr();
27 virtual void start() = 0; // UdsOp (AsyncJob) API; has body
28 virtual bool doneAll() const; // UdsOp (AsyncJob) API
30 /// read the next incoming message
33 /// handle IPC message just read
34 virtual void receive(const TypedMsgHdr
& message
) = 0;
37 void noteRead(const CommIoCbParams
¶ms
); // Comm callback API
40 TypedMsgHdr buf
; ///< msghdr struct filled by Comm
43 extern const char strandAddrLabel
[]; ///< strand's listening address unique label
47 #endif /* SQUID_IPC_PORT_H */