MasterXaction.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2022 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 {
41 public:
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 
76 private:
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 
@ initClient
HTTP or FTP client.
AnyP::PortCfgPointer squidPort
the listening port which originated this transaction
Definition: MasterXaction.h:63
RefCount< MasterXaction > Pointer
Definition: MasterXaction.h:42
identifies a protocol agent or Squid feature initiating transactions
XactionInitiator initiator
the initiator of this transaction
Definition: MasterXaction.h:69
Comm::ConnectionPointer tcpClient
the client TCP connection which originated this transaction
Definition: MasterXaction.h:66
MasterXaction(const XactionInitiator anInitiator, const AnyP::PortCfgPointer &aPort)
Definition: MasterXaction.h:78
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
InstanceId< MasterXaction, uint64_t > id
transaction ID.
Definition: MasterXaction.h:60
static Pointer MakePortful(const AnyP::PortCfgPointer &aPort)
Definition: MasterXaction.h:54

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors