pub struct Config {
pub name: String,
pub uri: String,
pub timeout: f64,
pub buffer: f64,
pub throttle: f64,
pub heartbeat: f64,
pub data: Data,
}Expand description
Configuration for Game State Integration.
You can find more informations on VALVE’s wiki.
Fields§
§name: StringService name.
It will be used to create the cfg filename, so it shouldn’t contain any
spaces or special chars except _.
uri: StringThe uri that will receive the payload.
The game will be making POST requests to this uri.
timeout: f64Game expects an HTTP 2XX response code from its HTTP POST request, and game will not attempt submitting the next HTTP POST request while a previous request is still in flight. The game will consider the request as timed out if a response is not received within so many seconds, and will re-heartbeat next time with full state omitting any delta-computation.
buffer: f64Because multiple game events tend to occur one after another very quickly, it is recommended to specify a non-zero buffer. When buffering is enabled, the game will collect events for so many seconds to report a bigger delta. For localhost service integration this is less of an issue and can be tuned to match the needs of the service or set to 0.0 to disable buffering completely.
throttle: f64For high-traffic endpoints this setting will make the game client not send another request for at least this many seconds after receiving previous HTTP 2XX response to avoid notifying the service when game state changes too frequently.
heartbeat: f64Even if no game state change occurs, this setting instructs the game to send a request so many seconds after receiving previous HTTP 2XX response. The service can be configured to consider game as offline or disconnected if it didn’t get a notification for a significant period of time exceeding the heartbeat interval.
data: DataSubscribed Components.