Patric Stout
f08da1d373
Codechange: the "no revision detected" string is with four zeros (norev0000) ( #12328 )
2024-03-17 13:17:35 +00:00
Rubidium
fe12d38024
Codechange: split initiating of joining and identification of the client
2024-03-16 13:35:41 +01:00
Rubidium
3534214dfc
Codechange: use reference instead of pointer for CommandPacket
2024-02-05 18:57:58 +01:00
Rubidium
cb588d8d3f
Codechange: use std::vector for the incoming command queue
2024-02-05 18:57:58 +01:00
Rubidium
63708609fb
Codechange: define the size of the PacketType enumerations
2024-02-05 17:10:35 +01:00
Rubidium
72a44b0df6
Codechange: use references for handling received TCP packets
2024-02-05 16:30:49 +01:00
Rubidium
eaae0bb5e7
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
2023-07-19 19:30:14 +02:00
Jonathan G Rennison
4f6d75f97d
Fix #11016 : Defer deletion of client and server game socket handlers
...
This fixes various use after free scenarios in error handling paths
2023-06-25 12:02:32 +01:00
Patric Stout
199e41c762
Codechange: use default dtor instead of empty ( #10826 )
2023-05-14 23:31:03 +02:00
rubidium42
730687080a
Fix: Update some network documentation to match the new command system ( #10657 )
2023-04-15 09:10:09 +00:00
dP
31cf9e888b
Add: [Network] external chat messages for remote admins ( #9563 )
2021-09-19 23:09:06 +02:00
Patric Stout
1ef4d3cf19
Remove: COMPANY_INFO packets and related code ( #9475 )
2021-08-14 23:24:02 +02:00
Patric Stout
3d55ea2d4d
Feature: make "join game" button join the game, instead of first showing a lobby window ( #9467 )
...
Nobody really paid attention to the lobby window, and it completely
missed its purpose. Most people don't even wait for companies to
show up, but just hit "New Company".
This in turn means people create a lot of unneeded companies, while
they "just want to watch the game" or join another company.
Instead, "Join Game" now just joins the game as spectators.
2021-08-14 23:07:18 +02:00
rubidium42
44ca7d9377
Change: Use gender-neutral pronouns
2021-05-15 10:16:48 +02:00
Patric Stout
96dc0d04ec
Fix b3003dd1: swap SERVER_GAME_INFO with CLIENT_GAME_INFO ( #9129 )
...
The idea is that if you query an older server that does not support
this packet yet, the client receives an error. The assumption was
that on every "illegal packet" the connection would be closed. This
turns out to be false.
Now CLIENT_GAME_INFO aligns with the old PACKET_CLIENT_NEWGRFS_CHECKED,
which does a pre-check (which fails), and an error is sent back
and the connection is closed.
This is not a nice solution, but it is the best we got.
2021-04-28 23:09:03 +02:00
Patric Stout
b3003dd163
Add: ability to retrieve game info from server over TCP
2021-04-27 20:18:53 +02:00
Patric Stout
53c28a8ec9
Codechange: [Network] replace _realtime_tick with std::chrono
2021-02-27 00:36:14 +01:00
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
2019-11-10 17:59:20 +00:00
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
2019-04-10 23:22:20 +02: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
2e54c8fdfa
(svn r26056) -Fix: a number of possibly uninitialised variables
2013-11-22 21:50:43 +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
alberth
732e073261
(svn r24776) -Doc: Typo fixes, additions, and additional dots collected from various sources (including Eagle_rainbow, MinchinWeb)
2012-12-01 13:12:39 +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
2e572b98de
(svn r22400) -Codechange: replace some defines in the tcp/game code so doxygen can create better documentation
2011-05-01 11:30:03 +00:00
rubidium
ce91f6b45e
(svn r22370) -Codechange/fix: keep better accounting of the order in which clients joined:
...
* Clients can't be starved from joining the game
* Clients will see the amount of clients actually waiting in front of them, instead of the amount of waiting clients in total
2011-04-22 16:07:47 +00:00
rubidium
0c23b0b3a4
(svn r21429) -Fix [FS#3771]: the server didn't check for the paused state when allowing to execute commands
2010-12-07 21:12:23 +00:00
rubidium
97434f0e06
(svn r21392) -Change: prepare the network protocol for getting the file size later in the download process
2010-12-05 14:34:19 +00:00
rubidium
31c8ab0ed8
(svn r21361) -Change: make sure the client is listening, or rather receiving, our frames
2010-11-30 14:18:20 +00:00
rubidium
b6c2216749
(svn r21358) -Codechange: make some network function names conform to coding style
2010-11-30 13:38:46 +00:00
rubidium
6d09f4a3cb
(svn r21254) -Change: show a different "lag" message when a client is lagging because of connection trouble or lagging because the client is just slow
2010-11-19 12:33:19 +00:00
rubidium
f24c91c487
(svn r21030) -Codechange: move ClientStatus into the network server socket class
2010-10-24 20:07:32 +00:00
rubidium
2cd67a51ac
(svn r21029) -Codechange: split the map downloading packet + 3-state enum into 3 separate packets
2010-10-24 20:03:33 +00:00
rubidium
3317f1c01e
(svn r21025) -Codechange: document PacketGameType's enums and reshuffle them slightly to make the whole more readable and easier to understand
2010-10-24 15:22:59 +00:00
rubidium
d71f590ed6
(svn r20993) -Codechange: some shuffling of game protocol packet description so they're documented in the "same" place as UDP, content and admin packets (dihedral)
2010-10-18 20:41:53 +00:00
rubidium
c9cbab14ea
(svn r20937) -Codechange: move some variables from client/server to server only
2010-10-15 20:29:59 +00:00
rubidium
9858d699a3
(svn r20935) -Codechange: only let the server side use a pool of connected sockets
2010-10-15 19:58:56 +00:00
rubidium
7ba07d9573
(svn r20929) -Codechange: make NetworkCloseClient a class method
2010-10-15 18:42:52 +00:00
rubidium
0ca7e4e82e
(svn r20924) -Codechange: make the game connection packet handling look more like UDP/content packet handling
2010-10-15 13:47:37 +00:00
rubidium
8eb07d097e
(svn r20923) -Codechange: prepare creating sub-classes of NetworkClientSocket for server and client side
2010-10-15 13:22:00 +00:00
rubidium
a4c6d07edc
(svn r20553) -Feature: allow rate limiting of incoming commands
2010-08-19 08:59:36 +00:00
rubidium
b594990071
(svn r20549) -Codechange: centralise the handling of the incoming commands (from clients and the server)
2010-08-18 22:40:17 +00:00
rubidium
e8e22c99fd
(svn r20548) -Codechange: rename some variables giving them slightly more meaningful names
2010-08-18 21:30:38 +00:00
rubidium
1c3d42598e
(svn r20510) -Codechange: unify packet queue handling and make insertion O(1) instead of O(n)
2010-08-15 23:44:45 +00:00
rubidium
2555522eab
(svn r19809) -Codechange: make some unnamed network related enums/defines static const variables
2010-05-13 09:04:41 +00:00
smatz
f48f4c8293
(svn r19693) -Codechange: split STATUS_INACTIVE to two states
2010-04-22 17:26:57 +00:00
rubidium
df4d8b3bc9
(svn r19678) -Fix (r19607): client status was shown incorrect in the console
2010-04-19 19:50:56 +00:00
smatz
7f3844d3aa
(svn r19610) -Codechange: rename STATUS_AUTH to STATUS_AUTHORIZED
2010-04-11 17:32:14 +00:00