]> git.ipfire.org Git - thirdparty/squid.git/blob - src/MasterXaction.h
Merged from trunk (r13515).
[thirdparty/squid.git] / src / MasterXaction.h
1 #ifndef SQUID_SRC_MASTERXACTION_H
2 #define SQUID_SRC_MASTERXACTION_H
3
4 #include "anyp/forward.h"
5 #include "base/InstanceId.h"
6 #include "base/Lock.h"
7 #include "comm/forward.h"
8
9 /** Master transaction details.
10 *
11 * Aggregates historical data from individual related protocol-specific
12 * transactions such as an HTTP client transaction and the corresponding
13 * HTTP or FTP server transaction.
14 *
15 * Individual transaction information worth sending or logging should be
16 * recorded here, ideally without exposing other master transaction users
17 * to internal details of individual transactions. For example, storing an
18 * HTTP client IP address is a good idea but storing a pointer to some
19 * client-side job which maintains that address is not.
20 *
21 * A master transaction is created by a newly accepted client connection,
22 * a new request on the existing client connection, or an internal request
23 * generated by Squid. All client-side protocols, including HTTP, HTCP, ICP,
24 * and SNMP will eventually create master transactions.
25 *
26 * A master transaction is auto-destroyed when its last user is gone.
27 */
28 class MasterXaction : public RefCountable
29 {
30 public:
31 typedef RefCount<MasterXaction> Pointer;
32
33 /// transaction ID.
34 InstanceId<MasterXaction> id;
35
36 /// the listening port which originated this transaction
37 AnyP::PortCfgPointer squidPort;
38
39 /// the client TCP connection which originated this transaction
40 Comm::ConnectionPointer tcpClient;
41
42 // TODO: add state from other Jobs in the transaction
43 };
44
45 #endif /* SQUID_SRC_MASTERXACTION_H */