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_SRC_MGR_FORWARDER_H
12 #define SQUID_SRC_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 
19 class CommCloseCbParams;
20 class HttpRequest;
21 class StoreEntry;
22 class ErrorState;
23 
24 namespace Mgr
25 {
26 
32 {
34 
35 public:
36  Forwarder(const Comm::ConnectionPointer &aConn, const ActionParams &aParams, HttpRequest* aRequest,
37  StoreEntry* anEntry, const AccessLogEntryPointer &anAle);
38  ~Forwarder() override;
39 
40 protected:
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 
47 private:
48  void noteCommClosed(const CommCloseCbParams& params);
49  void sendError(ErrorState* error);
50 
51 private:
57 };
58 
59 } // namespace Mgr
60 
61 #endif /* SQUID_SRC_MGR_FORWARDER_H */
62 
void noteCommClosed(const CommCloseCbParams &params)
called when the client socket gets closed by some external force
Definition: Forwarder.cc:100
void swanSong() override
closes our copy of the client HTTP connection socket
Definition: Forwarder.cc:62
void error(char *format,...)
void handleError() override
Definition: Forwarder.cc:76
Forwarder(const Comm::ConnectionPointer &aConn, const ActionParams &aParams, HttpRequest *aRequest, StoreEntry *anEntry, const AccessLogEntryPointer &anAle)
Definition: Forwarder.cc:29
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
HttpRequest * httpRequest
HTTP client request for detailing errors.
Definition: Forwarder.h:52
CBDATA_CHILD(Forwarder)
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
AccessLogEntryPointer ale
more transaction details
Definition: Forwarder.h:56
~Forwarder() override
Definition: Forwarder.cc:50
Cache Manager Action parameters extracted from the user request.
Definition: ActionParams.h:23
void handleException(const std::exception &e) override
terminate with an error
Definition: Forwarder.cc:91
Cache Manager API.
Definition: Action.h:20

 

Introduction

Documentation

Support

Miscellaneous