Inquirer.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 49 SNMP Interface */
10 
11 #ifndef SQUID_SRC_SNMP_INQUIRER_H
12 #define SQUID_SRC_SNMP_INQUIRER_H
13 
14 #include "comm/forward.h"
15 #include "ipc/Inquirer.h"
16 #include "snmp/forward.h"
17 #include "snmp/Pdu.h"
18 
19 class CommCloseCbParams;
20 
21 namespace Snmp
22 {
23 
26 class Inquirer: public Ipc::Inquirer
27 {
29 
30 public:
31  Inquirer(const Request& aRequest, const Ipc::StrandCoords& coords);
32 
33 protected:
34  /* AsyncJob API */
35  void start() override;
36  bool doneAll() const override;
37 
38  /* Ipc::Inquirer API */
39  void cleanup() override;
40  void handleException(const std::exception& e) override;
41  void sendResponse() override;
42  bool aggregate(Ipc::Response::Pointer aResponse) override;
43 
44 private:
45  void noteCommClosed(const CommCloseCbParams& params);
46 
47 private:
50 
53 };
54 
55 } // namespace Snmp
56 
57 #endif /* SQUID_SRC_SNMP_INQUIRER_H */
58 
AsyncCall::Pointer writer
comm_write callback
Definition: Inquirer.h:51
bool doneAll() const override
whether positive goal has been reached
Definition: Inquirer.cc:100
Definition: forward.h:14
SNMP request.
Definition: Request.h:24
Inquirer(const Request &aRequest, const Ipc::StrandCoords &coords)
Definition: Inquirer.cc:24
void start() override
called by AsyncStart; do not call directly
Definition: Inquirer.cc:57
void handleException(const std::exception &e) override
do specific exception handling
Definition: Inquirer.cc:66
void noteCommClosed(const CommCloseCbParams &params)
called when the some external force closed our socket
Definition: Inquirer.cc:87
bool aggregate(Ipc::Response::Pointer aResponse) override
perform aggregating of responses and returns true if need to continue
Definition: Inquirer.cc:73
Definition: Pdu.h:23
void cleanup() override
closes our copy of the client connection socket
Definition: Inquirer.cc:44
void sendResponse() override
send response to client
Definition: Inquirer.cc:106
Pdu aggrPdu
aggregated pdu
Definition: Inquirer.h:48
AsyncCall::Pointer closer
comm_close handler
Definition: Inquirer.h:52
std::vector< StrandCoord > StrandCoords
a collection of strand coordinates; the order, if any, is owner-dependent
Definition: StrandCoords.h:19
CBDATA_CHILD(Inquirer)
Comm::ConnectionPointer conn
client connection descriptor
Definition: Inquirer.h:49

 

Introduction

Documentation

Support

Miscellaneous