Rust+.py Docs
  • Getting Started
    • Welcome to the Rust+.py Docs!
    • Quick Start
    • Getting Player Details
      • FCM Listener
      • Getting Entity ID's
    • RustSocket
      • Rate Limiting
  • API methods
    • Removing Listeners
    • Getting Team Info
    • Getting Team Chat
    • Getting Server Info
    • Getting the Map
    • Sending Messages
    • Getting the Time
    • Getting Entity Information
    • Getting Map Markers
    • Getting Contents of Monitors
    • Promoting Players to Team Leader
  • Command System
    • Commands Overview
    • Command Options
    • Command Decorator
    • Hanging The Socket
  • Event System
    • Events Overview
  • Cameras
    • Camera Managers
Powered by GitBook
On this page

Was this helpful?

  1. Getting Started
  2. RustSocket

Rate Limiting

PreviousRustSocketNextRemoving Listeners

Last updated 2 months ago

Was this helpful?

The server uses a '' approach meaning that you should be careful how many requests you send, however if you are sensible, this should be a non-issue...

You get: 50 tokens max per IP address with 15 replenished per second 25 tokens max per PlayerID with 3 replenished per second

And these are the costs:

get_map = 5 or 6 (depending on what you add to the map)
get_time = 1
get_info = 1
get_markers = 1
send_team_chat = 2
get_team_info = 1
turn_on_switch = 1
turn_off_switch = 1
get_entitiy_info = 1
promote_to_team_leader = 1
get_tc_storage_contents = 1
get_current_events = 1

(Un)Subscribing to/from a Camera = 1
Moving a Camera = 0.01

RustPlus.py now handles ratelimiting automatically. It can either raise exceptions when you are going to exceed the limit or it can wait and send it later when you have enough tokens. Change this in the RustSocket constructor (raise_ratelimit_exception). This defaults to True, so set it to false if you want the socket to wait until you can afford the operations.

Token Bucket