Squid Web Cache master
Loading...
Searching...
No Matches
OptXact.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2025 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#ifndef SQUID_SRC_ADAPTATION_ICAP_OPTXACT_H
10#define SQUID_SRC_ADAPTATION_ICAP_OPTXACT_H
11
14
15namespace Adaptation
16{
17namespace Icap
18{
19
20/* OptXact sends an ICAP OPTIONS request to the ICAP service,
21 * parses the ICAP response, and sends it to the initiator. A NULL response
22 * means the ICAP service could not be contacted or did not return any
23 * valid response. */
24
25class OptXact: public Xaction
26{
28
29public:
31
32protected:
33 /* Xaction API */
34 void start() override;
35 void startShoveling() override;
36 void handleCommWrote(size_t size) override;
37 void handleCommRead(size_t size) override;
38
39 void makeRequest(MemBuf &buf);
40 bool parseResponse();
41
43 bool doneReading() const override { return commEof || readAll; }
44
45 void swanSong() override;
46
47private:
48 void finalizeLogInfo() override;
49
50 bool readAll;
51};
52
53// An Launcher that stores OptXact construction info and
54// creates OptXact when needed
56{
58
59public:
61
62protected:
63 Xaction *createXaction() override;
64};
65
66} // namespace Icap
67} // namespace Adaptation
68
69#endif /* SQUID_SRC_ADAPTATION_ICAP_OPTXACT_H */
70
int size
Definition ModDevPoll.cc:70
Xaction * createXaction() override
Definition OptXact.cc:145
bool readAll
read the entire OPTIONS response
Definition OptXact.h:50
void handleCommWrote(size_t size) override
Definition OptXact.cc:75
void start() override
called by AsyncStart; do not call directly
Definition OptXact.cc:32
void makeRequest(MemBuf &buf)
Definition OptXact.cc:52
void startShoveling() override
starts sending/receiving ICAP messages
Definition OptXact.cc:39
bool doneReading() const override
Definition OptXact.h:43
void finalizeLogInfo() override
Definition OptXact.cc:126
void swanSong() override
Definition OptXact.cc:121
void handleCommRead(size_t size) override
Definition OptXact.cc:82