]>
Commit | Line | Data |
---|---|---|
bbc27441 | 1 | /* |
4ac4a490 | 2 | * Copyright (C) 1996-2017 The Squid Software Foundation and contributors |
bbc27441 AJ |
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 | ||
94bfd31f AJ |
9 | #ifndef SQUID_SRC_MASTERXACTION_H |
10 | #define SQUID_SRC_MASTERXACTION_H | |
11 | ||
12 | #include "anyp/forward.h" | |
94bfd31f AJ |
13 | #include "base/InstanceId.h" |
14 | #include "base/Lock.h" | |
15 | #include "comm/forward.h" | |
16 | ||
17 | /** Master transaction details. | |
18 | * | |
19 | * Aggregates historical data from individual related protocol-specific | |
20 | * transactions such as an HTTP client transaction and the corresponding | |
21 | * HTTP or FTP server transaction. | |
22 | * | |
23 | * Individual transaction information worth sending or logging should be | |
24 | * recorded here, ideally without exposing other master transaction users | |
25 | * to internal details of individual transactions. For example, storing an | |
26 | * HTTP client IP address is a good idea but storing a pointer to some | |
27 | * client-side job which maintains that address is not. | |
28 | * | |
29 | * A master transaction is created by a newly accepted client connection, | |
30 | * a new request on the existing client connection, or an internal request | |
31 | * generated by Squid. All client-side protocols, including HTTP, HTCP, ICP, | |
32 | * and SNMP will eventually create master transactions. | |
33 | * | |
34 | * A master transaction is auto-destroyed when its last user is gone. | |
35 | */ | |
36 | class MasterXaction : public RefCountable | |
37 | { | |
38 | public: | |
39 | typedef RefCount<MasterXaction> Pointer; | |
40 | ||
41 | /// transaction ID. | |
42 | InstanceId<MasterXaction> id; | |
43 | ||
44 | /// the listening port which originated this transaction | |
45 | AnyP::PortCfgPointer squidPort; | |
46 | ||
47 | /// the client TCP connection which originated this transaction | |
48 | Comm::ConnectionPointer tcpClient; | |
49 | ||
50 | // TODO: add state from other Jobs in the transaction | |
51 | }; | |
52 | ||
53 | #endif /* SQUID_SRC_MASTERXACTION_H */ | |
f53969cc | 54 |