1
0
forked from 0ad/0ad
0ad/source
wraitii 2d40068cd1 Thread the NetClient session.
This threads the netclient session, which avoids timeouts when the
main-thread is not polling (map creation, very long simulation frames).

Unlike the NetServer, which should be as independent as possible from
the main thread, the NetClient is fundamentally tied to the game thread.
Therefore, this only threads the session object.
To ensure good performance and ease-of-use, lock-free queues for
in/out-going messages are used.

This fixes artificial timeouts, while also improving actual ping reports
(since frame-time is no longer a factor).
It effectively reverts D1513/eda236522c and 2e7e1c0b2b, all hacks around
lag-timeouts (and bits of 1a3fb29ff3).

Based on a patch by: Stan
Comments by: Vladislavbelov
Fixes #3700, refs #3373

Differential Revision: https://code.wildfiregames.com/D2848
This was SVN commit r24518.
2021-01-06 15:26:11 +00:00
..
collada Fix compiler warnings on VS 2015, refs #3439, refs #5069. 2018-03-10 09:58:53 +00:00
graphics Fix incorrect prop height for floating objects. 2020-12-31 16:17:58 +00:00
gui Add missing files in 4942cabab5 2020-12-31 14:27:02 +00:00
i18n Update ICU on Windows to 68.1 with the v140_xp toolset. 2020-12-02 16:47:28 +00:00
lib Fix renderer crash in GCC 7.5. 2021-01-06 14:56:17 +00:00
lobby Add missing files in 4942cabab5 2020-12-31 14:27:02 +00:00
maths Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
mocks More FreeBSD build fixes. 2012-01-30 06:21:11 +00:00
network Thread the NetClient session. 2021-01-06 15:26:11 +00:00
pch Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
ps Add initial support for MCST Elbrus 2000 (e2k) CPU architecture 2020-12-31 15:52:12 +00:00
renderer Fix renderer crash in GCC 7.5. 2021-01-06 14:56:17 +00:00
rlinterface Further header & precompiled cleanup, fix no-PCH builds. 2020-12-09 14:39:14 +00:00
scriptinterface Correctly serialize/deserialize user-defined JS objects. 2020-12-27 17:18:13 +00:00
simulation2 Fix renderer crash in GCC 7.5. 2021-01-06 14:56:17 +00:00
soundmanager Fix most Clang 10 Warnings 2020-12-31 14:25:37 +00:00
third_party Fix most Clang 10 Warnings 2020-12-31 14:25:37 +00:00
tools Fix most Clang 10 Warnings 2020-12-31 14:25:37 +00:00
main.cpp Thread the NetClient session. 2021-01-06 15:26:11 +00:00
test_setup.cpp Fix non-visual replay on Windows. Use the actual detected resolution. 2020-12-12 08:18:24 +00:00