]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/ipc/StrandCoord.h
2 * Copyright (C) 1996-2016 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
9 #ifndef SQUID_IPC_STRAND_COORD_H
10 #define SQUID_IPC_STRAND_COORD_H
12 #include "ipc/forward.h"
13 #include "SquidString.h"
18 /// Strand location details
22 StrandCoord(); ///< unknown location
23 StrandCoord(int akidId
, pid_t aPid
);
25 void pack(TypedMsgHdr
&hdrMsg
) const; ///< prepare for sendmsg()
26 void unpack(const TypedMsgHdr
&hdrMsg
); ///< from recvmsg()
29 int kidId
; ///< internal Squid process number
30 pid_t pid
; ///< OS process or thread identifier
32 String tag
; ///< optional unique well-known key (e.g., cache_dir path)
35 /// strand registration with Coordinator (also used as an ACK)
39 explicit HereIamMessage(const StrandCoord
&strand
); ///< from registrant
40 explicit HereIamMessage(const TypedMsgHdr
&hdrMsg
); ///< from recvmsg()
41 void pack(TypedMsgHdr
&hdrMsg
) const; ///< prepare for sendmsg()
44 StrandCoord strand
; ///< registrant coordinates and related details
49 #endif /* SQUID_IPC_STRAND_COORD_H */