]> git.ipfire.org Git - thirdparty/squid.git/blob - src/ipc/StrandSearch.cc
Source Format Enforcement (#763)
[thirdparty/squid.git] / src / ipc / StrandSearch.cc
1 /*
2 * Copyright (C) 1996-2021 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 /* DEBUG: section 54 Interprocess Communication */
10
11 #include "squid.h"
12 #include "globals.h"
13 #include "ipc/Messages.h"
14 #include "ipc/StrandSearch.h"
15 #include "ipc/TypedMsgHdr.h"
16
17 Ipc::StrandSearchRequest::StrandSearchRequest(const String &aTag):
18 requestorId(KidIdentifier),
19 tag(aTag),
20 qid(MyQuestionerId())
21 {
22 }
23
24 Ipc::StrandSearchRequest::StrandSearchRequest(const TypedMsgHdr &hdrMsg):
25 requestorId(-1)
26 {
27 hdrMsg.checkType(mtFindStrand);
28 hdrMsg.getPod(requestorId);
29 hdrMsg.getString(tag);
30 qid.unpack(hdrMsg);
31 }
32
33 void Ipc::StrandSearchRequest::pack(TypedMsgHdr &hdrMsg) const
34 {
35 hdrMsg.setType(mtFindStrand);
36 hdrMsg.putPod(requestorId);
37 hdrMsg.putString(tag);
38 qid.pack(hdrMsg);
39 }
40