Squid Web Cache master
Loading...
Searching...
No Matches
MessageBucket.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_MESSAGEBUCKET_H
10#define SQUID_SRC_MESSAGEBUCKET_H
11
12#if USE_DELAY_POOLS
13
14#include "BandwidthBucket.h"
15#include "base/RefCount.h"
16#include "comm/forward.h"
17#include "MessageDelayPools.h"
18
21{
23
24public:
26
27 MessageBucket(const int speed, const int initialLevelPercent, const double sizeLimit, MessageDelayPool::Pointer pool);
28
29 /* BandwidthBucket API */
30 int quota() override;
31 void scheduleWrite(Comm::IoCallback *state) override;
32 void reduceBucket(int len) override;
33
34private:
36};
37
38#endif /* USE_DELAY_POOLS */
39
40#endif /* SQUID_SRC_MESSAGEBUCKET_H */
41
#define RefCountable
The locking interface for use on Reference-Counted classes.
Definition Lock.h:66
Base class for Squid-to-client bandwidth limiting.
Details about a particular Comm IO callback event.
Definition IoCallback.h:30
Limits Squid-to-client bandwidth for each matching response.
MEMPROXY_CLASS(MessageBucket)
MessageDelayPool::Pointer theAggregate
void reduceBucket(int len) override
Decreases the bucket level.
int quota() override
void scheduleWrite(Comm::IoCallback *state) override
Will plan another write call.
RefCount< MessageBucket > Pointer