summaryrefslogtreecommitdiff
path: root/os/emscripten/pre.js
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-04-30 11:34:47 +0200
committerGitHub <noreply@github.com>2021-04-30 11:34:47 +0200
commit69118d063f9316e10128580f790175cd2779abdc (patch)
tree95f0c7c736c6c14a6419c07bbb2c9fac32e0a012 /os/emscripten/pre.js
parentf00564eeb20a09647f6f52b4ca5b39cb1e6a59aa (diff)
downloadopenttd-69118d063f9316e10128580f790175cd2779abdc.tar.xz
Change: use TCP for everything except for master-server and initial server scan (#9130)
This means that pressing Refresh button and adding servers manually now uses TCP. The master-server and initial scan are still UDP as they will be replaced by Game Coordinator; no need to change this now. If we query a server that is too old, show a proper warning to the user informing him the server is too old.
Diffstat (limited to 'os/emscripten/pre.js')
-rw-r--r--os/emscripten/pre.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/os/emscripten/pre.js b/os/emscripten/pre.js
index 1563e4f95..82664004e 100644
--- a/os/emscripten/pre.js
+++ b/os/emscripten/pre.js
@@ -65,10 +65,14 @@ Module.preRun.push(function() {
}
window.openttd_server_list = function() {
- add_server = Module.cwrap("em_openttd_add_server", null, ["string", "number"]);
+ add_server = Module.cwrap("em_openttd_add_server", null, ["string"]);
- /* Add servers that support WebSocket here. Example:
- * add_server("localhost", 3979); */
+ /* Add servers that support WebSocket here. Examples:
+ * add_server("localhost");
+ * add_server("localhost:3979");
+ * add_server("127.0.0.1:3979");
+ * add_server("[::1]:3979");
+ */
}
var leftButtonDown = false;