|
Squid Web Cache master
|
#include <QuestionerId.h>
Public Member Functions | |
| QuestionerId ()=default | |
| to-be-determined ID | |
| void | pack (TypedMsgHdr &) const |
| for sending the ID of the asking process | |
| 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 | |
| void | print (std::ostream &) const |
| reports the stored opaque ID value (for debugging) | |
Private Member Functions | |
| QuestionerId (const pid_t aPid) | |
| for MyQuestionerId() convenience | |
Private Attributes | |
| pid_t | pid = -1 |
Friends | |
| QuestionerId | MyQuestionerId () |
| the questioner ID of the current/calling process | |
Identifies a kid process sending IPC messages that require an answer. Must be unique across all kids with pending questions.
Definition at line 21 of file QuestionerId.h.
|
default |
|
inlineexplicitprivate |
Definition at line 41 of file QuestionerId.h.
| void Ipc::QuestionerId::pack | ( | TypedMsgHdr & | hdrMsg | ) | const |
Definition at line 25 of file QuestionerId.cc.
References pid, and Ipc::TypedMsgHdr::putPod().
| void Ipc::QuestionerId::print | ( | std::ostream & | os | ) | const |
| void Ipc::QuestionerId::rejectAnswerIfStale | ( | ) | const |
Definition at line 37 of file QuestionerId.cc.
References Debug::Extra(), Here, Ipc::MyQuestionerId(), pid, pid, and ToSBuf().
| void Ipc::QuestionerId::unpack | ( | const TypedMsgHdr & | hdrMsg | ) |
Definition at line 31 of file QuestionerId.cc.
References Ipc::TypedMsgHdr::getPod(), and pid.
Referenced by Ipc::StrandSearchRequest::StrandSearchRequest().
|
friend |
|
private |
OS process ID of the asking kid. If the kid restarts, it is assumed not to wrap back to the old value until the answer is received.
Definition at line 46 of file QuestionerId.h.
Referenced by pack(), and rejectAnswerIfStale().