9#ifndef SQUID_SRC_IPC_QUESTIONERID_H
10#define SQUID_SRC_IPC_QUESTIONERID_H
37 void print(std::ostream &)
const;
54template <
class Answer>
58 answer.intendedRecepient().rejectAnswerIfStale();
friend QuestionerId MyQuestionerId()
the questioner ID of the current/calling process
void pack(TypedMsgHdr &) const
for sending the ID of the asking process
void print(std::ostream &) const
reports the stored opaque ID value (for debugging)
void unpack(const TypedMsgHdr &)
for receiving the ID of the asking process
void rejectAnswerIfStale() const
does nothing but throws if the questioner was not the current process
QuestionerId(const pid_t aPid)
for MyQuestionerId() convenience
QuestionerId()=default
to-be-determined ID
struct msghdr with a known type, fixed-size I/O and control buffers
const Answer & Mine(const Answer &answer)
std::ostream & operator<<(std::ostream &os, const QuestionerId &qid)
QuestionerId MyQuestionerId()
the questioner ID of the current/calling process