DNS: Difference between revisions

998 bytes added ,  10 November 2016
Line 57: Line 57:
The DNS to query is currently not configurable at system start by setting a property. The version number can be changed by setting property /sim/terrasync/scenery-version to a value other than the default "ws20".
The DNS to query is currently not configurable at system start by setting a property. The version number can be changed by setting property /sim/terrasync/scenery-version to a value other than the default "ws20".


==== Algorithm to pick a Server ====
* At startup, if TerraSync is enabled and if the property /sim/terrasync/http-server is set to "automatic" (the default), a DNS query for terrasync.flightgear.org is sent and the response filtered for entries with the flag field set to "U".
* All entries that have a "order" value higher than the lowest order are discarded. (currently the sourceforge entry)
* The remaining entries are filtered for those with the lowest preference. (both other entries survive this filter)
* a random entry from the remaining list is picked for the entire session of FlightGear.
This is implemented in <code>SGTerraSync::WorkerThread::run()</code> [https://sourceforge.net/p/flightgear/simgear/ci/next/tree/simgear/scene/tsync/terrasync.cxx#l441 here].
The property /sim/terrasync/http-server can be set to user defined URL pointing to the location of a custom TerraSync server e.g. <code>http://myterrasync.org/custom-scenery</code>.
This will disable the above algorithm.


=== Multiplayer ===
=== Multiplayer ===