+/*
+ * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
#ifndef SQUID_FORWARD_H
#define SQUID_FORWARD_H
class FwdState : public RefCountable
{
+ CBDATA_CLASS(FwdState);
+
public:
typedef RefCount<FwdState> Pointer;
~FwdState();
void connectStart();
void connectDone(const Comm::ConnectionPointer & conn, Comm::Flag status, int xerrno);
void connectTimeout(int fd);
+ time_t timeLeft() const; ///< the time left before the forwarding timeout expired
bool checkRetry();
bool checkRetriable();
void dispatch();
/// possible pconn race states
typedef enum { raceImpossible, racePossible, raceHappened } PconnRace;
PconnRace pconnRace; ///< current pconn race state
-
- // NP: keep this last. It plays with private/public
- CBDATA_CLASS2(FwdState);
};
void getOutgoingAddress(HttpRequest * request, Comm::ConnectionPointer conn);
#endif /* SQUID_FORWARD_H */
+