]> git.ipfire.org Git - thirdparty/squid.git/blob - src/ipc/StrandSearch.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / ipc / StrandSearch.h
1 /*
2 * Copyright (C) 1996-2017 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_IPC_STRAND_SEARCH_H
10 #define SQUID_IPC_STRAND_SEARCH_H
11
12 #include "ipc/forward.h"
13 #include "ipc/StrandCoord.h"
14 #include "SquidString.h"
15
16 namespace Ipc
17 {
18
19 /// asynchronous strand search request
20 class StrandSearchRequest
21 {
22 public:
23 StrandSearchRequest();
24 explicit StrandSearchRequest(const TypedMsgHdr &hdrMsg); ///< from recvmsg()
25 void pack(TypedMsgHdr &hdrMsg) const; ///< prepare for sendmsg()
26
27 public:
28 int requestorId; ///< sender-provided return address
29 String tag; ///< set when looking for a matching StrandCoord::tag
30 };
31
32 /// asynchronous strand search response
33 class StrandSearchResponse
34 {
35 public:
36 StrandSearchResponse(const StrandCoord &strand);
37 explicit StrandSearchResponse(const TypedMsgHdr &hdrMsg); ///< from recvmsg()
38 void pack(TypedMsgHdr &hdrMsg) const; ///< prepare for sendmsg()
39
40 public:
41 StrandCoord strand; ///< answer matching StrandSearchRequest criteria
42 };
43
44 } // namespace Ipc;
45
46 #endif /* SQUID_IPC_STRAND_SEARCH_H */
47