FwdState.h
Go to the documentation of this file.
96 static void Start(const Comm::ConnectionPointer &client, StoreEntry *, HttpRequest *, const AccessLogEntryPointer &alp);
142 FwdState(const Comm::ConnectionPointer &client, StoreEntry *, HttpRequest *, const AccessLogEntryPointer &alp);
169 void advanceDestination(const char *stepDescription, const Comm::ConnectionPointer &conn, const StepStart &startStep);
184 void syncWithServerConn(const Comm::ConnectionPointer &server, const char *host, const bool reused);
Ip::NfMarkConfig aclFindNfMarkConfig(acl_nfmark *, ACLChecklist *)
Checks for a netfilter mark value to apply depending on the ACL.
Definition: FwdState.cc:1470
Definition: Stopwatch.h:18
CBDATA_CHILD(FwdState)
Comm::ConnectionPointer serverConn
a successfully opened connection to a server.
Definition: FwdState.h:237
void pause()
ends the current measurement period if needed; requires prior resume()
Definition: Stopwatch.cc:41
Interface for those who need a list of peers to forward a request to.
Definition: PeerSelectState.h:32
void ResetMarkingsToServer(HttpRequest *, Comm::Connection &)
Definition: FwdState.cc:1569
void reactToZeroSizeObject()
ERR_ZERO_SIZE_OBJECT requires special adjustments.
Definition: FwdState.cc:476
Definition: pconn.h:113
Definition: EncryptorAnswer.h:21
Definition: HttpTunnelerAnswer.h:29
void syncWithServerConn(const Comm::ConnectionPointer &server, const char *host, const bool reused)
commits to using the given open to-peer connection
Definition: FwdState.cc:1065
void secureConnectionToPeerIfNeeded(const Comm::ConnectionPointer &)
handles an established TCP connection to peer (including origin servers)
Definition: FwdState.cc:967
struct FwdState::@59 flags
JobWait< HappyConnOpener > transportWait
waits for a transport connection to the peer to be established/opened
Definition: FwdState.h:224
time_t connectingTimeout(const Comm::ConnectionPointer &conn) const
Definition: FwdState.cc:1444
bool connected_okay
TCP link ever opened properly. This affects retry of POST,PUT,CONNECT,etc.
Definition: FwdState.h:217
void advanceDestination(const char *stepDescription, const Comm::ConnectionPointer &conn, const StepStart &startStep)
starts a preparation step for an established connection; retries on failures
Definition: FwdState.cc:820
tos_t aclMapTOS(acl_tos *, ACLChecklist *)
Checks for a TOS value to apply depending on the ACL.
Definition: FwdState.cc:1458
void usePinned()
send request on an existing connection dedicated to the requesting client
Definition: FwdState.cc:1149
void syncHierNote(const Comm::ConnectionPointer &server, const char *host)
Definition: FwdState.cc:1085
void tunnelEstablishmentDone(Http::TunnelerAnswer &answer)
resumes operations after the (possibly failed) HTTP CONNECT exchange
Definition: FwdState.cc:929
Definition: Connection.h:72
Definition: AccessLogEntry.h:40
Definition: Checklist.h:30
static void Start(const Comm::ConnectionPointer &client, StoreEntry *, HttpRequest *, const AccessLogEntryPointer &alp)
Initiates request forwarding to a peer or origin server.
Definition: FwdState.cc:338
static void RegisterWithCacheManager(void)
Definition: FwdState.cc:1396
static void HandleStoreAbort(FwdState *)
called by Store if the entry is no longer usable
Definition: FwdState.cc:83
Definition: FwdState.h:57
void noteDestination(Comm::ConnectionPointer conn) override
called when a new unique destination has been found
Definition: FwdState.cc:587
void stopAndDestroy(const char *reason)
ends forwarding; relies on refcounting so the effect may not be immediate
Definition: FwdState.cc:184
void closeServerConnection(const char *reason)
stops monitoring server connection for closure and updates pconn stats
Definition: FwdState.cc:108
Definition: HttpRequest.h:48
bool exhaustedTries() const
whether we have used up all permitted forwarding attempts
Definition: FwdState.cc:1416
void updateAleWithFinalError()
updates ALE when we finalize the transaction error (if any)
Definition: FwdState.cc:241
const Comm::ConnectionPointer & serverConnection() const
Definition: FwdState.h:138
void getOutgoingAddress(HttpRequest *, const Comm::ConnectionPointer &)
Definition: FwdState.cc:1481
void successfullyConnectedToPeer(const Comm::ConnectionPointer &)
called when all negotiations with the peer have been completed
Definition: FwdState.cc:1050
void updateAttempts(int)
sets n_tries to the given value (while keeping ALE, if any, in sync)
Definition: FwdState.cc:1095
Definition: QosConfig.h:46
void establishTunnelThruProxy(const Comm::ConnectionPointer &)
Definition: FwdState.cc:908
JobWait< Security::PeerConnector > encryptionWait
waits for the established transport connection to be secured/encrypted
Definition: FwdState.h:227
bool waitingForDispatched
whether we are waiting for the last dispatch()ed activity to end
Definition: FwdState.h:234
Comm::ConnectionPointer clientConn
a possibly open connection to the client.
Definition: FwdState.h:212
void noteDestinationsEnd(ErrorState *selectionError) override
Definition: FwdState.cc:616
FwdState(const Comm::ConnectionPointer &client, StoreEntry *, HttpRequest *, const AccessLogEntryPointer &alp)
Definition: FwdState.cc:120
Definition: HappyConnOpener.h:105
static bool EnoughTimeToReForward(const time_t fwdStart)
Definition: FwdState.cc:431
static time_t ForwardTimeout(const time_t fwdStart)
time left to finish the whole forwarding process (which started at fwdStart)
Definition: FwdState.cc:423
Definition: ResolvedPeers.h:121
Definition: FwdState.h:86
ErrorState * makeConnectingError(const err_type type) const
static void logReplyStatus(int tries, const Http::StatusCode status)
Definition: FwdState.cc:1402
void GetMarkingsToServer(HttpRequest *request, Comm::Connection &conn)
Definition: FwdState.cc:1560
Definition: ResolvedPeers.h:33
Final result (an open connection or an error) sent to the job initiator.
Definition: HappyConnOpener.h:75
Definition: QosConfig.h:32
Definition: Store.h:37
void connectedToPeer(Security::EncryptorAnswer &answer)
called when all negotiations with the TLS-speaking peer have been completed
Definition: FwdState.cc:1014
PeeringActivityTimer peeringTimer
Measures time spent on selecting and communicating with peers.
Definition: FwdState.h:251
void pconnPush(Comm::ConnectionPointer &conn, const char *domain)
void secureConnectionToPeer(const Comm::ConnectionPointer &)
encrypts an established TCP connection to peer (including origin servers)
Definition: FwdState.cc:996
static void fwdStart(const Comm::ConnectionPointer &client, StoreEntry *, HttpRequest *)
Same as Start() but no master xaction info (AccessLogEntry) available.
Definition: FwdState.cc:407
Definition: errorpage.h:88
void connectDone(const Comm::ConnectionPointer &conn, Comm::Flag status, int xerrno)
void markStoredReplyAsWhole(const char *whyWeAreSure)
Definition: FwdState.cc:575
bool stopped
Whether the task is done participating in the managed activity.
Definition: FwdState.h:83
void closePendingConnection(const Comm::ConnectionPointer &conn, const char *reason)
get rid of a to-server connection that failed to become serverConn
Definition: FwdState.cc:96
PconnPool * fwdPconnPool
a collection of previously used persistent Squid-to-peer HTTP(S) connections
Definition: FwdState.cc:78
bool checkRetriable()
Whether we may try sending this request again after a failure.
Definition: FwdState.cc:735
void notifyConnOpener()
makes sure connection opener knows that the destinations have changed
Definition: FwdState.cc:661
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products