OpenTTD/src/network/core
Patric Stout f7e390bdc0
Feature: use Happy Eyeballs to make network connections (TCP-only) (#9199)
Hostnames like "content.openttd.org" resolve into multiple IPv4 and IPv6.
It is possible that either of the IPs is not working, either due to
a poorly configured OS (having IPv6 but no valid route), broken network
paths, or a service that is temporary unavailable.

Instead of trying the IPs one by one, waiting for a 3s timeout between
each, be a bit more like browsers, and stack attempts on top of each
other with slight delays. This is called Happy Eyebells.

Initially, try the first IPv6 address. If within 250ms there is no
connection yet, try the first IPv4 address. 250ms later, try the
second IPv6 address, etc, till all addresses are tried.

If any connection is created, abort all the other (pending) connections
and use the one that is created. If all fail 3s after the last connect(),
trigger a timeout for all.
2021-05-06 23:13:35 +02:00
..
CMakeLists.txt Codechange: encapsulate network error handling 2021-05-01 19:36:22 +02:00
address.cpp Feature: use Happy Eyeballs to make network connections (TCP-only) (#9199) 2021-05-06 23:13:35 +02:00
address.h Feature: use Happy Eyeballs to make network connections (TCP-only) (#9199) 2021-05-06 23:13:35 +02:00
config.h Codechange: use NetworkAddress instead of two host/port variables where possible 2021-04-29 20:12:11 +02:00
core.cpp Codechange: encapsulate network error handling 2021-05-01 19:36:22 +02:00
core.h Codechange: move all NetworkGameInfo related functions to a single file 2021-04-27 20:18:53 +02:00
game_info.cpp Codechange: [Network] Use std::string for NetworkGameInfo 2021-05-06 21:45:36 +02:00
game_info.h Codechange: [Network] Use std::string for NetworkGameInfo 2021-05-06 21:45:36 +02:00
host.cpp Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
host.h Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
os_abstraction.cpp Codechange: move some OS abstraction method implementations out of the header 2021-05-01 19:36:22 +02:00
os_abstraction.h Codechange: move some OS abstraction method implementations out of the header 2021-05-01 19:36:22 +02:00
packet.cpp Add: [Network] Reading std::string from a packet 2021-05-03 17:56:05 +02:00
packet.h Add: [Network] Reading std::string from a packet 2021-05-03 17:56:05 +02:00
tcp.cpp Codechange: encapsulate network error handling 2021-05-01 19:36:22 +02:00
tcp.h Feature: use Happy Eyeballs to make network connections (TCP-only) (#9199) 2021-05-06 23:13:35 +02:00
tcp_admin.cpp Codechange: Replace assert_compile macro with static_assert 2020-12-27 10:55:42 +00:00
tcp_admin.h Doc: server name doesn't need to be advertised to be valid 2021-04-20 17:34:04 +02:00
tcp_connect.cpp Feature: use Happy Eyeballs to make network connections (TCP-only) (#9199) 2021-05-06 23:13:35 +02:00
tcp_content.cpp Cleanup: remove #ifdefs for compiling the old content server 2021-04-27 19:58:03 +02:00
tcp_content.h Cleanup: remove #ifdefs for compiling the old content server 2021-04-27 19:58:03 +02:00
tcp_content_type.h Cleanup: remove #ifdefs for compiling the old content server 2021-04-27 19:58:03 +02:00
tcp_game.cpp Add: ability to retrieve game info from server over TCP 2021-04-27 20:18:53 +02:00
tcp_game.h Fix b3003dd1: swap SERVER_GAME_INFO with CLIENT_GAME_INFO (#9129) 2021-04-28 23:09:03 +02:00
tcp_http.cpp Feature: use Happy Eyeballs to make network connections (TCP-only) (#9199) 2021-05-06 23:13:35 +02:00
tcp_http.h Feature: use Happy Eyeballs to make network connections (TCP-only) (#9199) 2021-05-06 23:13:35 +02:00
tcp_listen.h Codechange: encapsulate network error handling 2021-05-01 19:36:22 +02:00
udp.cpp Codechange: [Network] Use std::string for NetworkAddress' host name 2021-05-06 20:33:26 +02:00
udp.h Codechange: move all NetworkGameInfo related functions to a single file 2021-04-27 20:18:53 +02:00