- void SendReq(FetchItem *Itm,CircleBuf &Out);
- bool Go(bool ToFile,ServerState *Srv);
- bool Flush(ServerState *Srv);
- bool ServerDie(ServerState *Srv);
-
- /** \brief Result of the header parsing */
- enum DealWithHeadersResult {
- /** \brief The file is open and ready */
- FILE_IS_OPEN,
- /** \brief We got a IMS hit, the file has not changed */
- IMS_HIT,
- /** \brief The server reported a unrecoverable error */
- ERROR_UNRECOVERABLE,
- /** \brief The server reported a error with a error content page */
- ERROR_WITH_CONTENT_PAGE,
- /** \brief A error on the client side */
- ERROR_NOT_FROM_SERVER,
- /** \brief A redirect or retry request */
- TRY_AGAIN_OR_REDIRECT
- };
- /** \brief Handle the retrieved header data */
- DealWithHeadersResult DealWithHeaders(FetchResult &Res,ServerState *Srv);
-
- /** \brief Try to AutoDetect the proxy */
- bool AutoDetectProxy();
-
- virtual bool Fetch(FetchItem *);
- virtual bool Configuration(string Message);
-
- // In the event of a fatal signal this file will be closed and timestamped.
- static string FailFile;
- static int FailFd;
- static time_t FailTime;
- static void SigTerm(int);
-
- string NextURI;
- string AutoDetectProxyCmd;
+ public:
+ virtual void SendReq(FetchItem *Itm);
+
+ virtual bool Configuration(std::string Message);
+
+ virtual ServerState * CreateServerState(URI uri);
+ virtual void RotateDNS();
+
+ protected:
+ std::string AutoDetectProxyCmd;