PocketMine-MP 5.23.3 git-f7687af337d001ddbcc47b8e773f014a33faa662
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: