Configuration
The config file locates at "Kerbal Space Programe/GameData/Kift/server.cfg".
Default configuration:
KIFT
{
port = 9090
maxRpcPerUpdate = 1
maxDurationPerUpdateInNanoseconds = 20000000 // 20ms
}
port
The port to which the server is listening.
maxRpcPerUpdate
By default, "maxRpcPerUpdate" is set to 1, which means one RPC is processed for each Update().
So the default RPC rate should be the same with the game's FPS, typically, 60 FPS.
If "maxRpcPerUpdate" is set to N, then at most N * FPS RPCs are processed per second. For example, if "maxRpcPerUpdate" is set to 5, and the game is running at 60 FPS, then 300 RPCs are processed per second at most.
maxDurationPerUpdateInNanoseconds
"maxDurationPerUpdateInNanoseconds" describes how long each Update() should take. The KiftAddon will exit current Update() if the time has elapsed for more than configured duration, since the beginning of current Update().
Since the time is measured after each RPC, so the actual time each Update() takes is always larger than "maxDurationPerUpdateInNanoseconds".
For example, if "maxDurationPerUpdateInNanoseconds" is set to 4 seconds, and each RPC takes 3 seconds to finish. Then there is 1 second left after the first RPC is finished, the second RPC also takes 3 seconds to finish, so it's 3+3=6 seconds in total. 6 is larger than 4, so current Update() is done.