]> git.ipfire.org Git - thirdparty/squid.git/blame - src/ipc/StrandCoord.h
Removed CVS $ markers
[thirdparty/squid.git] / src / ipc / StrandCoord.h
CommitLineData
8822ebee 1/*
8822ebee
AR
2 */
3
4#ifndef SQUID_IPC_STRAND_COORD_H
5#define SQUID_IPC_STRAND_COORD_H
6
7#include "ipc/forward.h"
254912f3 8#include "SquidString.h"
8822ebee
AR
9
10namespace Ipc
11{
12
13/// Strand location details
14class StrandCoord
15{
16public:
17 StrandCoord(); ///< unknown location
254912f3
AR
18 StrandCoord(int akidId, pid_t aPid);
19
8822ebee 20 void pack(TypedMsgHdr &hdrMsg) const; ///< prepare for sendmsg()
254912f3 21 void unpack(const TypedMsgHdr &hdrMsg); ///< from recvmsg()
8822ebee
AR
22
23public:
24 int kidId; ///< internal Squid process number
25 pid_t pid; ///< OS process or thread identifier
254912f3
AR
26
27 String tag; ///< optional unique well-known key (e.g., cache_dir path)
8822ebee
AR
28};
29
254912f3
AR
30/// strand registration with Coordinator (also used as an ACK)
31class HereIamMessage
32{
33public:
34 explicit HereIamMessage(const StrandCoord &strand); ///< from registrant
35 explicit HereIamMessage(const TypedMsgHdr &hdrMsg); ///< from recvmsg()
36 void pack(TypedMsgHdr &hdrMsg) const; ///< prepare for sendmsg()
37
38public:
39 StrandCoord strand; ///< registrant coordinates and related details
40};
41
8822ebee
AR
42} // namespace Ipc;
43
44#endif /* SQUID_IPC_STRAND_COORD_H */