Commit Graph

35 Commits

Author SHA1 Message Date
Patric Stout a8641ea44a
Add: support filtering content entries for patchpacks (#9541)
This changes nothing for us, but allows patchpacks to add the
right pieces of code to start filtering content entries on patchpack
only entries.
2021-09-11 15:34:46 +02:00
Patric Stout a403653805
Codechange: [Network] split CloseSocket and CloseConnection more clearly (#9261)
* Codechange: [Network] split CloseSocket and CloseConnection more clearly

- CloseSocket now closes the actual OS socket.
- CloseConnection frees up the resources to just before CloseSocket.
- dtors call CloseSocket / CloseConnection where needed.
2021-05-13 11:46:51 +02:00
Rubidium 187a3f20bf Codechange: remove pointless close call due to resolving virtual functions statically in destructors
In the destructors of many of the network related classes Close() is called, just like the
top class in that hierarchy. However, due to virtual functions getting resolved statically
in the destructor it would always call the empty Close() of the top class.
Document the other cases where a virtual call is resolved statically.
2021-05-13 10:03:26 +02:00
rubidium42 015e3b412e Cleanup: remove #ifdefs for compiling the old content server 2021-04-27 19:58:03 +02:00
rubidium42 84985c1223 Codechange: [Network] Do not leak os_abstraction.h via fios.h 2021-04-27 18:17:34 +01:00
Patric Stout cd757d53ca Codechange: remove always-empty "address" from NetworkContentSocketHandler
When ever you saw this debug lines (which you never should), they
showed an empty address. It is also not very useful to have, as it
always points to a known server anyway.
2021-04-20 17:34:04 +02:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
peter1138 07de9d6c3f Codechange: Use override keyword in networking classes. 2019-03-24 17:38:42 +00:00
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.
2019-03-20 19:24:55 +01:00
rubidium 5eac3a77d2 (svn r25597) -Fix [FS#5635]: [Content] When the server closed the connection, the client would for eternity try to read a packet and never timeout making it impossible to reconnect 2013-07-13 09:26:11 +00:00
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 2013-01-08 22:46:42 +00:00
rubidium 9db98f3b14 (svn r24638) -Codechange: add some #ifndefs so MSU code doesn't need to compile it, and doesn't need all the required dependencies 2012-10-28 19:16:58 +00:00
yexo 053770d4a6 (svn r24488) -Feature [FS#5236]: add buttons to view textfiles from the online content window (LordAro) 2012-08-20 21:03:50 +00:00
yexo 483d878d5f (svn r24466) -Codechange [FS#5236]: add general function for ContentType -> Subdirectory conversion (LordAro) 2012-08-13 18:49:38 +00:00
truebrain 963802e9a7 (svn r23612) -Add: allow importing libraries in the same way as AI does, only with GS prefix (and in game/library) 2011-12-19 20:56:59 +00:00
truebrain b4f832f29f (svn r23605) -Add: GAME_DIR and CONTENT_TYPE_GAME, and read gamescript from that directory 2011-12-19 20:54:37 +00:00
rubidium df16ebd730 (svn r23595) -Codechange: add comma after last enum to get a more uniform coding style 2011-12-19 17:48:04 +00:00
rubidium 99ec3a044a (svn r22403) -Document: some more network/core code 2011-05-01 13:29:40 +00:00
rubidium d4737e0724 (svn r22399) -Codechange: replace some defines in the tcp/content code so doxygen can create better documentation 2011-05-01 11:13:11 +00:00
rubidium eb299736c1 (svn r21886) -Codechange: move documentation towards the code to make it more likely to be updated [n]. 2011-01-22 09:53:15 +00:00
alberth 7303f7d199 (svn r21595) -Codechange: Some header files had their name changed, update the ifndef/define/endif lines. 2010-12-22 11:46:41 +00:00
rubidium b6c2216749 (svn r21358) -Codechange: make some network function names conform to coding style 2010-11-30 13:38:46 +00:00
alberth 35fec79700 (svn r20499) -Doc: Spelling fixes, and one doxygen comment addition. 2010-08-15 14:06:43 +00:00
frosch 4ce5c6d93d (svn r20089) -Fix [FS#3932]: Access of already freed memory, esp. due to hidden destructor call from Swap(). 2010-07-08 18:38:38 +00:00
rubidium a8d6d18b22 (svn r18608) -Change: add the concept of music sets 2009-12-22 21:40:29 +00:00
rubidium 5ff6053326 (svn r17699) -Codechange: move #ifdef ENABLE_NETWORK till after the 'generic' includes so compilation without network support doesn't get broken as easily by changes in header files 2009-10-04 20:00:56 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
rubidium 9ee2a66c86 (svn r17139) -Change: add the concept of sound sets 2009-08-09 19:50:44 +00:00
glx 521bf687ee (svn r15919) -Fix (r15916): mingw doesn't know getnameinfo() (unless you compile for XP SP2+). Also fix a MSVC warning. 2009-04-02 23:22:59 +00:00
rubidium 804370d964 (svn r15914) -Codechange: let the content handling make use of NetworkAddress. 2009-04-02 18:35:59 +00:00
rubidium 4f5a8b15ed (svn r15206) -Fix [FS#2567]: memory corruption due to not properly cleanup up the mess when cancelling a download 2009-01-22 10:09:56 +00:00
rubidium ff328bf68b (svn r15178) -Change: rename 'update' to 'upgrade' as that's a bit more clear 2009-01-20 21:05:13 +00:00
rubidium eeb38a8e3a (svn r15176) -Fix [FS#2554]: querying the content server could free when resolving the hostname or connecting takes long/is timing out. 2009-01-20 16:51:55 +00:00
rubidium 99b1f1a8f4 (svn r15161) -Change: bump url to 96 bytes 2009-01-20 09:52:11 +00:00
rubidium 3a13b75e37 (svn r15126) -Feature: downloading content from a central server (content.openttd.org) where authors can upload they NewGRFS/AI etc. This should make joining servers that use only NewGRFs that are distributed via this system easier as the players can download the NewGRFs from in the game. It should also make it easier to see whether there are updates for NewGRFs and make the necessary updates. 2009-01-17 16:53:32 +00:00