Expand description
Game State Integration with Dota 2.
Provides a Server that listens for JSON events sent by Dota 2. Enabling game state
integration requires:
- Creating a
.cfg[configuration file] in the Dota 2 game configuration directory. - Running Dota 2 with the -gamestateintegration [launch option].
The configuration file can have any name name, but must be prefixed by gamestate_integration_.
For example, gamestate_integration_test.cfg would be located:
- In Linux:
~/.steam/steam/steamapps/common/dota 2 beta/game/dota/cfg/gamestate_integration_test.cfg - In Windows:
D:\Steam\steamapps\common\dota 2 beta\dota\cfg\gamestate_integration_test.cfg
Here’s a sample configuration file:
“dota2-gsi Configuration” { “uri” “http://127.0.0.1:53000/” “timeout” “5.0” “buffer” “0.1” “throttle” “0.1” “heartbeat” “30.0” “data” { “buildings” “1” “provider” “1” “map” “1” “player” “1” “hero” “1” “abilities” “1” “items” “1” “draft” “1” “wearables” “1” } “auth” { “token” “abcdefghijklmopqrstuvxyz123456789” } }
Note the URI used in the configuration file must be the same URI used when initializing a Server.
Modules§
Structs§
Enums§
Traits§
- Handler
- Trait for any async function or struct that can be used to handle game state integration events.
Functions§
- get_
content_ length_ from_ headers - Extract Content-Length value from a list of HTTP headers.
- process
- Process a game state integration request.