]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/ipc/StrandCoord.cc
2 * Copyright (C) 1996-2015 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 /* DEBUG: section 54 Interprocess Communication */
13 #include "ipc/Messages.h"
14 #include "ipc/StrandCoord.h"
15 #include "ipc/TypedMsgHdr.h"
17 Ipc::StrandCoord::StrandCoord(): kidId(-1), pid(0)
21 Ipc::StrandCoord::StrandCoord(int aKidId
, pid_t aPid
): kidId(aKidId
), pid(aPid
)
26 Ipc::StrandCoord::unpack(const TypedMsgHdr
&hdrMsg
)
30 hdrMsg
.getString(tag
);
33 void Ipc::StrandCoord::pack(TypedMsgHdr
&hdrMsg
) const
37 hdrMsg
.putString(tag
);
40 Ipc::HereIamMessage::HereIamMessage(const StrandCoord
&aStrand
):
45 Ipc::HereIamMessage::HereIamMessage(const TypedMsgHdr
&hdrMsg
)
47 hdrMsg
.checkType(mtRegistration
);
48 strand
.unpack(hdrMsg
);
51 void Ipc::HereIamMessage::pack(TypedMsgHdr
&hdrMsg
) const
53 hdrMsg
.setType(mtRegistration
);