forked from mirrors/0ad
2d40068cd1
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 and2e7e1c0b2b, all hacks around lag-timeouts (and bits of1a3fb29ff3). 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.