JavaSteam icon indicating copy to clipboard operation
JavaSteam copied to clipboard

Build functionality for the server list to refresh itself

Open LossyDragon opened this issue 4 months ago • 0 comments

Description

Bring functionality for the server list to refresh itself.

SmartCMServerList has getters/setters for static method defaultServerWebSocket and defaultServerNetFilter. By default they have Seattle CM's.

You can change the remember duration by referencing steamclient.getServers().setServerListBeforeRefreshTimeSpan(<Duration>) or steamclient.getServers().setBadConnectionMemoryTimeSpan(<Duration>).

Server list providers now return the last time they were written (I had to add a bool to ReplaceList to avoid rewriting the file if its using provider list).

By default it will consider server list newer than 7 days as fresh. If it fails to refresh the list from API, it will use the previous logic of using the provider.

From SK PR 1452

Checklist

  • [x] Code compiles correctly
  • [x] All tests passing
  • [x] Samples run successfully
  • [x] Extended the README / documentation, if necessary

LossyDragon avatar Oct 22 '24 21:10 LossyDragon