RateLimiter class
Rate limiter for the server
Constructors
- RateLimiter.new({required int rpm, required int perPeerRPM, required int dialDataRPM, required DateTime now()})
Properties
- dialDataRPM → int
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- now → DateTime Function()
-
final
- perPeerRPM → int
-
final
- rpm → int
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
accept(
PeerId peerId) → bool - Accept a new request
-
acceptDialDataRequest(
PeerId peerId) → bool - Accept a dial data request
-
close(
) → void - Close the rate limiter
-
completeRequest(
PeerId peerId) → void - Mark a request as complete
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited