1 #ifndef SQUID_SRC_MASTERXACTION_H
2 #define SQUID_SRC_MASTERXACTION_H
4 #include "anyp/forward.h"
5 #include "base/InstanceId.h"
7 #include "comm/forward.h"
9 /** Master transaction details.
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.
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.
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.
26 * A master transaction is auto-destroyed when its last user is gone.
28 class MasterXaction
: public RefCountable
31 typedef RefCount
<MasterXaction
> Pointer
;
34 InstanceId
<MasterXaction
> id
;
36 /// the listening port which originated this transaction
37 AnyP::PortCfgPointer squidPort
;
39 /// the client TCP connection which originated this transaction
40 Comm::ConnectionPointer tcpClient
;
42 // TODO: add state from other Jobs in the transaction
45 #endif /* SQUID_SRC_MASTERXACTION_H */