Forwarder.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/* DEBUG: section 16 Cache Manager API */
10
11#ifndef SQUID_MGR_FORWARDER_H
12#define SQUID_MGR_FORWARDER_H
13
14#include "comm/forward.h"
15#include "ipc/Forwarder.h"
16#include "log/forward.h"
17#include "mgr/ActionParams.h"
18
20class HttpRequest;
21class StoreEntry;
22class ErrorState;
23
24namespace Mgr
25{
26
32{
34
35public:
36 Forwarder(const Comm::ConnectionPointer &aConn, const ActionParams &aParams, HttpRequest* aRequest,
37 StoreEntry* anEntry, const AccessLogEntryPointer &anAle);
38 ~Forwarder() override;
39
40protected:
41 /* Ipc::Forwarder API */
42 void swanSong() override;
43 void handleError() override;
44 void handleTimeout() override;
45 void handleException(const std::exception& e) override;
46
47private:
48 void noteCommClosed(const CommCloseCbParams& params);
50
51private:
57};
58
59} // namespace Mgr
60
61#endif /* SQUID_MGR_FORWARDER_H */
62
void error(char *format,...)
Cache Manager Action parameters extracted from the user request.
Definition: ActionParams.h:24
void noteCommClosed(const CommCloseCbParams &params)
called when the client socket gets closed by some external force
Definition: Forwarder.cc:100
void handleTimeout() override
Definition: Forwarder.cc:84
void sendError(ErrorState *error)
send error page
Definition: Forwarder.cc:113
Comm::ConnectionPointer conn
HTTP client connection descriptor.
Definition: Forwarder.h:54
void handleException(const std::exception &e) override
terminate with an error
Definition: Forwarder.cc:91
AccessLogEntryPointer ale
more transaction details
Definition: Forwarder.h:56
~Forwarder() override
Definition: Forwarder.cc:50
Forwarder(const Comm::ConnectionPointer &aConn, const ActionParams &aParams, HttpRequest *aRequest, StoreEntry *anEntry, const AccessLogEntryPointer &anAle)
Definition: Forwarder.cc:29
void handleError() override
Definition: Forwarder.cc:76
void swanSong() override
closes our copy of the client HTTP connection socket
Definition: Forwarder.cc:62
StoreEntry * entry
Store entry expecting the response.
Definition: Forwarder.h:53
AsyncCall::Pointer closer
comm_close handler for the HTTP connection
Definition: Forwarder.h:55
CBDATA_CHILD(Forwarder)
HttpRequest * httpRequest
HTTP client request for detailing errors.
Definition: Forwarder.h:52
Cache Manager API.
Definition: Action.h:20

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors