|
Rubidium
|
r28531:925d537e515d
|
9 months ago
|
|
|
|
Rubidium
|
r28025:9116d6e411b0
|
12 months ago
|
|
|
|
Rubidium
|
r27737:728d55b97775
|
18 months ago
|
|
Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
|
|
Rubidium
|
r27529:197f49219ae3
|
17 months ago
|
|
|
|
Peter Nelson
|
r27379:fc235a1040ab
|
17 months ago
|
|
|
|
Rubidium
|
r26817:1d282e59fc7b
|
21 months ago
|
|
Codechange: pass large objects by reference instead of value
Especially when they get passed on directly to the next function or via a constructor into an instance variable
|
|
Rubidium
|
r26085:9f102a93b50e
|
3 years ago
|
|
|
|
Patric Stout
|
r26084:cf575a539016
|
3 years ago
|
|
Fix #9730: [Network] connections can use an invalid socket due to a race condition A race condition happens when an IPv6 connection takes more than 250ms to report an error, but does return before the IPv4 connection is established. In result, an invalid socket might be used for that connection.
|
|
Patric Stout
|
r26083:f59736ecfc37
|
3 years ago
|
|
Codechange: ensure OnConnect() always gets called with a valid socket ( #9729) This should already be the case, but now assert()s will tell us if this isn't.
|
|
Patric Stout
|
r25935:48afc7113a4c
|
3 years ago
|
|
|
|
Patric Stout
|
r25827:5a9ded1a0c1a
|
3 years ago
|
|
Feature: allow the use of STUN to connect client and server together
This method doesn't require port-forwarding to be used, and works for most common NAT routers in home setups. But, for sure it doesn't work for all setups, and not everyone will be able to use this.
|
|
Patric Stout
|
r25826:89dc24729f74
|
3 years ago
|
|
|
|
Patric Stout
|
r25815:13efa809f0d9
|
3 years ago
|
|
Feature: join servers based on their invite code
This removes the need to know a server IP to join it. Invite codes are small (~7 characters) indentifiers for servers, which can be exchanged with other players to join the servers.
|
|
Patric Stout
|
r25814:efd9cb732234
|
3 years ago
|
|
Change: groundwork to allow ServerAddress to use invite codes
Normally TCPConnecter will do a DNS resolving of the connection_string and connect to it. But for SERVER_ADDRESS_INVITE_CODE this is different: the Game Coordinator does the "resolving".
This means we need to allow TCPConnecter to not setup a connection and allow it to be told when a connection has been setup by an external (to TCPConnecter) part of the code. We do this by telling the (active) socket for the connection.
This means the rest of the code doesn't need to know the TCPConnecter is not doing a simple resolve+connect. The rest of the code only cares the connection is established; not how it was established.
|
|
Patric Stout
|
r25813:ea6d38b6c3a1
|
3 years ago
|
|
Codechange: track servers with a ServerAddress instead of a NetworkAddress
This allows future extensions to have different ways of referencing a server, instead of forcing to use IP:port.
|
|
Patric Stout
|
r25741:13a9744cbf13
|
3 years ago
|
|
|
|
Rubidium
|
r25707:226494aad20a
|
3 years ago
|
|
|
|
rubidium42
|
r25685:28affbeede23
|
3 years ago
|
|
|
|
rubidium42
|
r25655:1030dcb7eb52
|
3 years ago
|
|
|
|
Patric Stout
|
r25452:6a578e1b0eee
|
3 years ago
|
|
|
|
Patric Stout
|
r25440:04e72c31c8b4
|
3 years ago
|
|
Change: reworked the debug levels for network facility ( #9251) It now follows very simple rules: 0 - Fatal, user should know about this 1 - Error, but we are recovering 2 - Warning, wrong but okay if you don't know 3 - Info, information you might care about 4 - 5 - Debug #1 - High level debug messages 6 - Debug #2 - Low level debug messages 7 - Trace information
|
|
Patric Stout
|
r25425:cec1b2e2ebb9
|
3 years ago
|
|
Change: reworded many of the network errors during connect/listen ( #9230) Also changed some levels to 0, as a failing listen() is something we should tell the user about. Hiding this information is a bit evil.
|
|
Patric Stout
|
r25418:d0f9c7b63ea3
|
3 years ago
|
|
Fix: destroying a TCPConnecter that was still resolving made illegal writes
Basically, we should join the resolve thread before we destruct the object.
|
|
Patric Stout
|
r25406:017a9f8d3ec9
|
3 years ago
|
|
|
|
Patric Stout
|
r25397:c741c77120c8
|
3 years ago
|
|
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.
|
|
Patric Stout
|
r25388:32b23efdcf4e
|
3 years ago
|
|
Codechange: use connection_string in favour of NetworkAddress ( #9197) We now resolve the connection_string to a NetworkAddress in a much later state. This means there are fewer places constructing a NetworkAddress. The main benefit of this is in later PRs that introduce different types of NetworkAddresses. Storing this in things like NetworkGameList is rather complex, especially as NetworkAddress has to be mutable at all times. Additionally, the NetworkAddress is a complex object to store simple information: how to connect to this server.
|
|
Jonathan G Rennison
|
r24271:c20a6e3dcfe0
|
4 years ago
|
|
Fix: Racy use of flags in TCPConnecter::CheckCallbacks
conected and aborted flags are used concurrently from multiple threads.
|
|
S. D. Cloudt
|
r23917:50c2317ea357
|
5 years ago
|
|
|
|
Henry Wilson
|
r23607:36c15679007d
|
5 years ago
|
|
|
|
Michael Lutz
|
r23587:821735a25dec
|
6 years ago
|
|
Codechange: Replace custom thread code with C++11 thread objects.
We assume a conforming C++11 compiler environment that has a valid <thread>-header. Failure to run a real thread is handled gracefully.
|
|
Henry Wilson
|
r23538:8df50944b27a
|
6 years ago
|
|
|
|
Henry Wilson
|
r23536:ce42deb0b32d
|
6 years ago
|
|
|
|
Henry Wilson
|
r23532:dc91fcd293f5
|
6 years ago
|
|
|
|
Henry Wilson
|
r23531:603769aaf687
|
6 years ago
|
|
|
|
Patric Stout
|
r23483:3733e6b8ff17
|
6 years ago
|
|
Remove: ENABLE_NETWORK switch
This switch has been a pain for years. Often disabling broke compilation, as no developer compiles OpenTTD without, neither do any of our official binaries.
Additionaly, it has grown so hugely in our codebase, that it clearly shows that the current solution was a poor one. 350+ instances of "#ifdef ENABLE_NETWORK" were in the code, of which only ~30 in the networking code itself. The rest were all around the code to do the right thing, from GUI to NewGRF.
A more proper solution would be to stub all the functions, and make sure the rest of the code can simply assume network is available. This was also partially done, and most variables were correct if networking was disabled. Despite that, often the #ifdefs were still used.
With the recent removal of DOS, there is also no platform anymore which we support where networking isn't working out-of-the-box.
All in all, it is time to remove the ENABLE_NETWORK switch. No replacement is planned, but if you feel we really need this option, we welcome any Pull Request which implements this in a way that doesn't crawl through the code like this diff shows we used to.
|
|
frosch
|
r22463:71520ac0d007
|
8 years ago
|
|
|
|
rubidium
|
r21383:942c32fb8b0e
|
10 years ago
|
|
|
|
rubidium
|
r17138:5078c9240593
|
14 years ago
|
|
|
|
rubidium
|
r13176:254c27d58bd6
|
15 years ago
|
|
|
|
rubidium
|
r12839:daeca5b0e6db
|
15 years ago
|
|
|
|
rubidium
|
r12768:980ae0491352
|
15 years ago
|
|
|
|
rubidium
|
r11550:baebd05afdd5
|
16 years ago
|
|
|
|
rubidium
|
r11547:d8613f4c59f9
|
16 years ago
|
|
|
|
rubidium
|
r10828:d8d68d002525
|
16 years ago
|
|
|