ServerListingController
A class in TavernLib, TavernLib.Backend.Server.
Sends the server to the Community Servers listing every 3 seconds from a background loop, backing off after failures, and removes it when the game quits. Server; TavernManager makes one when community_listed is on at start.
- Listed in TavernLib.Backend.Server
- Documented in Internals
Constructors
| Member | What it is |
|---|---|
ServerListingController(TavernManager manager) | Sets up the HTTP client, starts the heartbeat loop, and closes the listing when the game quits. |
Fields
5 private and internal fields
| Member | What it is |
|---|---|
private readonly HttpClient _apiClient | HTTP client used to post to and delete from the community server listing. |
private bool _closed | Set once the listing is closing, which ends the heartbeat loop. |
private TavernManager _manager | The TavernManager that supplies the server and port configs. |
private static readonly TimeSpan Interval | Time between listing heartbeats when they succeed (3 seconds). |
private const double LongestWaitSeconds | Longest wait, in seconds, between heartbeats after repeated failures. |
Methods
3 private and internal methods
Used in
Members of other types that take, return or hold a ServerListingController: