Commit Graph

18 Commits (jgrpp)

Author SHA1 Message Date
Patric Stout 8a2da49413 Remove: old server listing via Master Server
This removes all UDP from the game except for a local broadcast
to find LAN games.

So long Master Server, and tnx for all the fish!
3 years ago
Patric Stout 61fdef8457 Remove: old server announcement to Master Server
As we now use the Game Coordinator for announcements, there is no
longer a need to use the Master Server for this.
3 years ago
Patric Stout f94fb93779
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.
3 years ago
Rubidium ca6b9ad8b0 Change: move some things only relevant to UDP from network.cpp to network_udp.cpp 3 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Patric Stout e3c639a09f 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.
5 years ago
rubidium 531e501b5a (svn r23751) -Codechange: rename NetworkUDPGameLoop to a more descriptive name, and move the UDP specific bits to network_udp 13 years ago
rubidium 82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 15 years ago
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
rubidium 2663ad302f (svn r16022) -Fix (r15159): sometimes the unregister "query" thread could be delayed so much that the network stuff was already closed and the packet would never reach the master server causing the server to appear online longer than necessary. 15 years ago
rubidium 08e37a6f10 (svn r15987) -Fix: make the master socket only listen on the IP the server is bound to. 15 years ago
rubidium 5f3772a42c (svn r15157) -Codechange: wrap the hostname/ip and port into a single structure so we can pass either one of them and not convert an ip to a string and then back again. 16 years ago
rubidium 11da45ee55 (svn r14949) -Cleanup: pointer coding style 16 years ago
rubidium d03994098b (svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description. 16 years ago
rubidium 36bb92ae24 (svn r9050) -Codechange: Foo(void) -> Foo() 17 years ago
rubidium 6a820a30d1 (svn r8543) -Codechange: make a real difference between querying the server via UDP and TCP. 18 years ago
rubidium c48aa5db45 (svn r8078) -Codechange: rewrite UDP part of the network code to make use classes. This is only one of the many steps to really cleanup the network code. 18 years ago
rubidium 66bbf336c6 (svn r7759) -Merge: makefile rewrite. This merge features:
- A proper ./configure, so everything needs to be configured only once, not for every make.
 - Usage of makedepend when available. This greatly reduces the time needed for generating the dependencies.
 - A generator for all project files. There is a single file with sources, which is used to generate Makefiles and the project files for MSVC.
 - Proper support for OSX universal binaries.
 - Object files for non-MSVC compiles are also placed in separate directories, making is faster to switch between debug and release compiles and it does not touch the directory with the source files.
 - Functionality to make a bundle of all needed files for for example a nightly or distribution of a binary with all needed GRFs and language files.

Note: as this merge moves almost all files, it is recommended to make a backup of your working copy before updating your working copy.
18 years ago