MasterXaction.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 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_SRC_MASTERXACTION_H
10#define SQUID_SRC_MASTERXACTION_H
11
12#include "anyp/forward.h"
13#include "anyp/PortCfg.h"
14#include "base/InstanceId.h"
15#include "base/Lock.h"
16#include "base/RefCount.h"
17#include "comm/forward.h"
18#include "XactionInitiator.h"
19
40{
41public:
43
45 template <XactionInitiator::Initiator anInitiator>
47 {
48 static_assert(anInitiator != XactionInitiator::initClient, "not an HTTP or FTP client");
49 return new MasterXaction(anInitiator, nullptr);
50 }
51
55 {
57 }
58
61
64
67
70
72 bool generatingConnect = false;
73
74 // TODO: add state from other Jobs in the transaction
75
76private:
77 // use public Make() functions instead
78 MasterXaction(const XactionInitiator anInitiator, const AnyP::PortCfgPointer &aPort):
79 squidPort(aPort),
80 initiator(anInitiator)
81 {}
82};
83
84#endif /* SQUID_SRC_MASTERXACTION_H */
85
#define RefCountable
The locking interface for use on Reference-Counted classes.
Definition: Lock.h:66
AnyP::PortCfgPointer squidPort
the listening port which originated this transaction
Definition: MasterXaction.h:63
static Pointer MakePortless()
Create a master transaction not associated with a AnyP::PortCfg port.
Definition: MasterXaction.h:46
bool generatingConnect
whether we are currently creating a CONNECT header (to be sent to peer)
Definition: MasterXaction.h:72
RefCount< MasterXaction > Pointer
Definition: MasterXaction.h:42
InstanceId< MasterXaction, uint64_t > id
transaction ID.
Definition: MasterXaction.h:60
MasterXaction(const XactionInitiator anInitiator, const AnyP::PortCfgPointer &aPort)
Definition: MasterXaction.h:78
Comm::ConnectionPointer tcpClient
the client TCP connection which originated this transaction
Definition: MasterXaction.h:66
XactionInitiator initiator
the initiator of this transaction
Definition: MasterXaction.h:69
static Pointer MakePortful(const AnyP::PortCfgPointer &aPort)
Definition: MasterXaction.h:54
identifies a protocol agent or Squid feature initiating transactions
@ initClient
HTTP or FTP client.

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors