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