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_SNMPX_INQUIRER_H
12#define SQUID_SNMPX_INQUIRER_H
13
14#include "comm/forward.h"
15#include "ipc/Inquirer.h"
16#include "snmp/forward.h"
17#include "snmp/Pdu.h"
18
20
21namespace Snmp
22{
23
27{
29
30public:
31 Inquirer(const Request& aRequest, const Ipc::StrandCoords& coords);
32
33protected:
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
44private:
45 void noteCommClosed(const CommCloseCbParams& params);
46
47private:
50
53};
54
55} // namespace Snmp
56
57#endif /* SQUID_SNMPX_INQUIRER_H */
58
Pdu aggrPdu
aggregated pdu
Definition: Inquirer.h:48
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
CBDATA_CHILD(Inquirer)
AsyncCall::Pointer closer
comm_close handler
Definition: Inquirer.h:52
void sendResponse() override
send response to client
Definition: Inquirer.cc:106
void cleanup() override
closes our copy of the client connection socket
Definition: Inquirer.cc:44
Comm::ConnectionPointer conn
client connection descriptor
Definition: Inquirer.h:49
Inquirer(const Request &aRequest, const Ipc::StrandCoords &coords)
Definition: Inquirer.cc:24
AsyncCall::Pointer writer
comm_write callback
Definition: Inquirer.h:51
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
bool doneAll() const override
whether positive goal has been reached
Definition: Inquirer.cc:100
Definition: Pdu.h:24
SNMP request.
Definition: Request.h:25
std::vector< StrandCoord > StrandCoords
a collection of strand coordinates; the order, if any, is owner-dependent
Definition: StrandCoords.h:19
Definition: forward.h:15

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors