]>
Commit | Line | Data |
---|---|---|
b67e2c8c | 1 | /* |
b8ae064d | 2 | * Copyright (C) 1996-2023 The Squid Software Foundation and contributors |
b67e2c8c | 3 | * |
bbc27441 AJ |
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. | |
b67e2c8c | 7 | */ |
8 | ||
ff9d9458 FC |
9 | #ifndef SQUID_SRC_DELAYID_H |
10 | #define SQUID_SRC_DELAYID_H | |
b67e2c8c | 11 | |
9a0a18de | 12 | #if USE_DELAY_POOLS |
eb8ed10d | 13 | |
a928fdfd | 14 | #include "base/forward.h" |
b67e2c8c | 15 | #include "DelayIdComposite.h" |
16 | ||
c4a9875e VL |
17 | class ClientHttpRequest; |
18 | class HttpReply; | |
19 | ||
63be0a78 | 20 | /// \ingroup DelayPoolsAPI |
62e76326 | 21 | class DelayId |
22 | { | |
23 | ||
24 | public: | |
c4a9875e | 25 | static DelayId DelayClient(ClientHttpRequest *, HttpReply *reply = nullptr); |
b67e2c8c | 26 | DelayId (); |
27 | DelayId (unsigned short); | |
28 | ~DelayId (); | |
29 | unsigned short pool() const; | |
30 | DelayIdComposite::Pointer compositePosition(); | |
31 | DelayIdComposite::Pointer const compositePosition() const; | |
71a99cad | 32 | void compositePosition(const DelayIdComposite::Pointer &); |
b67e2c8c | 33 | bool operator == (DelayId const &rhs) const; |
34 | operator bool() const; | |
35 | int bytesWanted(int min, int max) const; | |
36 | void bytesIn (int qty); | |
a46d2c0e | 37 | void setNoDelay(bool const); |
a928fdfd | 38 | void delayRead(const AsyncCallPointer &); |
62e76326 | 39 | |
40 | private: | |
b67e2c8c | 41 | unsigned short pool_; |
42 | DelayIdComposite::Pointer compositeId; | |
a46d2c0e | 43 | bool markedAsNoDelay; |
b67e2c8c | 44 | }; |
62e76326 | 45 | |
9a0a18de | 46 | #endif /* USE_DELAY_POOLS */ |
ff9d9458 | 47 | #endif /* SQUID_SRC_DELAYID_H */ |
f53969cc | 48 |