Squid Web Cache master
Loading...
Searching...
No Matches
StrandCoord.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2025 The Squid Software Foundation and contributors
3 *
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.
7 */
8
9#ifndef SQUID_SRC_IPC_STRANDCOORD_H
10#define SQUID_SRC_IPC_STRANDCOORD_H
11
12#include "ipc/forward.h"
13#include "ipc/Messages.h"
14#include "ipc/QuestionerId.h"
15#include "SquidString.h"
16
17namespace Ipc
18{
19
22{
23public:
24 StrandCoord();
25 StrandCoord(int akidId, pid_t aPid);
26
27 void pack(TypedMsgHdr &hdrMsg) const;
28 void unpack(const TypedMsgHdr &hdrMsg);
29
30public:
31 int kidId;
32 pid_t pid;
33
35};
36
39{
40public:
41 explicit StrandMessage(const StrandCoord &, QuestionerId);
42 explicit StrandMessage(const TypedMsgHdr &);
43 void pack(MessageType, TypedMsgHdr &) const;
44
46 static void NotifyCoordinator(MessageType, const char *tag);
47
50
51public:
53
57};
58
59} // namespace Ipc;
60
61#endif /* SQUID_SRC_IPC_STRANDCOORD_H */
62
Strand location details.
Definition StrandCoord.h:22
void unpack(const TypedMsgHdr &hdrMsg)
from recvmsg()
void pack(TypedMsgHdr &hdrMsg) const
prepare for sendmsg()
StrandCoord()
unknown location
pid_t pid
OS process or thread identifier.
Definition StrandCoord.h:32
String tag
optional unique well-known key (e.g., cache_dir path)
Definition StrandCoord.h:34
int kidId
internal Squid process number
Definition StrandCoord.h:31
an IPC message carrying StrandCoord
Definition StrandCoord.h:39
QuestionerId qid
Definition StrandCoord.h:56
QuestionerId intendedRecepient() const
for Mine() tests
Definition StrandCoord.h:49
void pack(MessageType, TypedMsgHdr &) const
static void NotifyCoordinator(MessageType, const char *tag)
creates and sends StrandMessage to Coordinator
StrandCoord strand
messageType-specific coordinates (e.g., sender)
Definition StrandCoord.h:52
struct msghdr with a known type, fixed-size I/O and control buffers
Definition TypedMsgHdr.h:35
MessageType
message class identifier
Definition Messages.h:20