TsgcWSRateLimiter › Methods
Public methods grouped by purpose, followed by the full alphabetical list.
| Name | Description |
|---|---|
| IsAllowed | Returns True if a request of the given cost is allowed for the specified key. |
| Consume | Consumes cost tokens and returns a detailed TsgcRateLimitResult. |
| IsConnectionAllowed | Server hook: returns True if a new connection from IP passes rate limiting. |
| IsMessageAllowed | Server hook: returns True if a message from IP passes rate limiting. |
| Name | Description |
|---|---|
| RegisterConnection | Registers a new connection for tracking (called automatically by the server). |
| UnregisterConnection | Removes a connection from tracking (called automatically on disconnect). |
| Name | Description |
|---|---|
| Reset | Clears the counters for a single key. |
| ResetAll | Clears every internal counter and resets the Stats object. |
| Name | Description |
|---|---|
| SaveStateToFile | Persists all buckets and counters to the given file. |
| LoadStateFromFile | Restores buckets and counters previously saved to a file. |
| SaveStateToStream | Persists the internal state to an arbitrary TStream. |
| LoadStateFromStream | Restores the internal state from an arbitrary TStream. |
| Name | Description |
|---|---|
| Consume | Consumes cost tokens and returns a detailed TsgcRateLimitResult. |
| IsAllowed | Returns True if a request of the given cost is allowed for the specified key. |
| IsConnectionAllowed | Server hook: returns True if a new connection from IP passes rate limiting. |
| IsMessageAllowed | Server hook: returns True if a message from IP passes rate limiting. |
| LoadStateFromFile | Restores buckets and counters previously saved to a file. |
| LoadStateFromStream | Restores the internal state from an arbitrary TStream. |
| RegisterConnection | Registers a new connection for tracking (called automatically by the server). |
| Reset | Clears the counters for a single key. |
| ResetAll | Clears every internal counter and resets the Stats object. |
| SaveStateToFile | Persists all buckets and counters to the given file. |
| SaveStateToStream | Persists the internal state to an arbitrary TStream. |
| UnregisterConnection | Removes a connection from tracking (called automatically on disconnect). |