beyond-all-reason / beyond-all-reason/RecoilEngine
Document AutohostInterface
- Dominant language
- C++
- Stars
- 679
- Forks
- 290
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 40
Description
AutohostInterface is a major part of the engines capabilities to perform IPC (inter process communication) without games requiring to implement in-game (e.g. some gadget/widget using sockets, tcp/udp, http, jsonrpc etc explicitly).
We need to document the basics (argument parameters when starting the server, how to bind to the engines autohost socket, what kind of messages and payloads, etc).
Also provide information on how the Lua API can receive and send messages through the autohostinterface.
This is not a Lua API interface, so this would be some documentation page in the same level of API Reference but documented differently, its fine to be added as a Guide like other similar API pages that are not lua api.
References:
- [Socket Initialization](https://github.com/beyond-all-reason/RecoilEngine/blob/0683321af751bf99a7fe3fc28f5e1ca76b80c591/rts/Net/GameServer.cpp#L173)
- [Events and payload handling below](https://github.com/beyond-all-reason/RecoilEngine/blob/0683321af751bf99a7fe3fc28f5e1ca76b80c591/rts/Net/AutohostInterface.cpp#L36)
- [Spads Autohost Interface](https://github.com/Yaribz/SpringAutoHostInterface/blob/6b6ec06446fba1eb323e448063e91c251109e595/SpringAutoHostInterface.pm#L35), an example of a major consumer of this API
- Find references to `hostif` (the static reference to the autohostinterface instance) to find more on how and where the engine uses it
Contributor guide
Research direction
Start with rts/Net/GameServer.cpp at the Socket Initialization reference and rts/Net/AutohostInterface.cpp at the events and payload handling reference. Search for `hostif` to trace engine usage, and consult the linked Spads interface as a consumer example. Done means a Guide covering server arguments, socket binding, messages and payloads, plus Lua API send and receive behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- documentation, networking
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100