PocketMine-MP 5.21.2 git-a6534ecbbbcf369264567d27e5ed70f7f5be9816
Loading...
Searching...
No Matches
pocketmine\network\mcpe\PacketRateLimiter Class Reference
+ Collaboration diagram for pocketmine\network\mcpe\PacketRateLimiter:

Public Member Functions

 __construct (private string $name, private int $averagePerTick, int $maxBufferTicks, private int $updateFrequencyNs=50_000_000,)
 
 decrement (int $amount=1)
 
 update ()
 

Detailed Description

Definition at line 31 of file PacketRateLimiter.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\network\mcpe\PacketRateLimiter::__construct ( private string $name,
private int $averagePerTick,
int $maxBufferTicks,
private int $updateFrequencyNs = 50_000_000 )

Definition at line 41 of file PacketRateLimiter.php.

Member Function Documentation

◆ decrement()

pocketmine\network\mcpe\PacketRateLimiter::decrement ( int $amount = 1)
Exceptions
PacketHandlingExceptionif the rate limit has been exceeded

Definition at line 55 of file PacketRateLimiter.php.

◆ update()

pocketmine\network\mcpe\PacketRateLimiter::update ( )

Definition at line 65 of file PacketRateLimiter.php.


The documentation for this class was generated from the following file: