summaryrefslogtreecommitdiff
path: root/src/network/network_server.h
AgeCommit message (Collapse)Author
2021-04-24Codechange: encapsulate reading the size of a PacketRubidium
2021-02-28Fix: [Network] don't show "server doesn't respond" while in queuePatric Stout
Send all clients in the queue every game-day a packet that they are still in the queue.
2021-02-28Fix: [Network] send map to next client if current client disconnectsPatric Stout
Also terminate creating of the savegame, as the client is gone, there really is no need for that anymore.
2020-02-04Feature #7756: Allow server to supply a reason to kicked/banned clientsBjarni Thor
This commit adds the missing feature of allowing the server owner to provide a reason for kicking/banning a client, which the client sees in a pop-up window after being kicked. The implementation extends the network protocol by adding a new network action called NETWORK_ACTION_KICKED that is capable of having an error string, unlike the other network error packages. Additionally, the kick function broadcasts a message to all clients about the kicked client and the reason for the kick.
2019-12-21Codechange: Replace network related FOR_ALL with range-based for loopsglx
2019-11-10Cleanup: Removed SVN headersS. D. Cloudt
2019-04-06Codechange: Replace custom thread code with C++11 thread objects.Michael Lutz
We assume a conforming C++11 compiler environment that has a valid <thread>-header. Failure to run a real thread is handled gracefully.
2019-03-24Codechange: Use override keyword in networking classes.peter1138
2019-03-20Remove: ENABLE_NETWORK switchPatric Stout
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.
2014-05-11(svn r26576) -Fix [FS#6003]: [Network] AIs would not reset certain network ↵rubidium
state information upon creation of their company
2014-04-23(svn r26485) -Codechange: Replace ttd_strlcpy and ttd_strlcat with strecpy ↵frosch
and strecat.
2013-11-15(svn r26005) -Fix [FS#5478]: crash when transferring savegame from server to ↵rubidium
client
2013-01-08(svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by ↵planetmaker
Eagle_rainbow)
2011-12-19(svn r23595) -Codechange: add comma after last enum to get a more uniform ↵rubidium
coding style
2011-05-05(svn r22424) -Document: some more bitsrubidium
2011-05-01(svn r22400) -Codechange: replace some defines in the tcp/game code so ↵rubidium
doxygen can create better documentation
2011-04-22(svn r22368) -Codechange: move the IP address field from the ClientInfo to ↵rubidium
ClientSocket
2011-04-22(svn r22366) -Codechange: make GetClientIP a function of the server's ↵rubidium
ClientSocket, after all the Socket is the bit that's associated with the network
2011-04-22(svn r22363) -Codechange: NetworkFindClientStateFromClientID -> ↵rubidium
NetworkClientSocket::GetByClientID
2011-02-19(svn r22116) -Codechange: use PoolBase::Clean() at more placessmatz
2011-01-19(svn r21854) -Codechange: refactor the password setting methods to make it ↵rubidium
possible to change the password of other companies (on the server)
2011-01-19(svn r21853) -Codechange: HashCurrentCompanyPassword is only used by ↵rubidium
servers, so move it to network_server.* (dihedral)
2010-12-05(svn r21399) -Change/Feature/Fix [FS#4284]: perform the compression of ↵rubidium
savegames to send to the client asynchroniously. This will reduce the lag of the other clients to the time it takes to make the memory dump and it will speed up downloading the map as the download starts earlier (possibly with a slightly lower bandwidth due to slow compression). This should also fix the lag message people get when the savegame compression takes more than a few seconds.
2010-12-05(svn r21398) -Change/Feature-ish: when making a savegame to send to a ↵rubidium
client, don't write it to disk but create the packets immediately
2010-11-30(svn r21363) -Add: support for limiting the amount of (accepted) incoming datarubidium
2010-11-30(svn r21361) -Change: make sure the client is listening, or rather ↵rubidium
receiving, our frames
2010-10-24(svn r21030) -Codechange: move ClientStatus into the network server socket classrubidium
2010-10-15(svn r20938) -Codechange: make the code for listening on a socket (more) ↵rubidium
reusable
2010-10-15(svn r20937) -Codechange: move some variables from client/server to server onlyrubidium
2010-10-15(svn r20936) -Codechange: make server side packet sending methods class methodsrubidium
2010-10-15(svn r20935) -Codechange: only let the server side use a pool of connected ↵rubidium
sockets
2010-10-15(svn r20934) -Codechange: move NetworkGetClientName to the server's socketrubidium
2010-10-15(svn r20929) -Codechange: make NetworkCloseClient a class methodrubidium
2010-10-15(svn r20924) -Codechange: make the game connection packet handling look more ↵rubidium
like UDP/content packet handling
2010-10-15(svn r20923) -Codechange: prepare creating sub-classes of ↵rubidium
NetworkClientSocket for server and client side
2010-01-15(svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, ↵rubidium
if a header require a header make it include that header
2009-09-22(svn r17617) -Codechange: make the server side packet handling be more like ↵rubidium
the client side's handling, i.e. return the connection status -Fix: do not do invalid reads when a packet handling function closed a connection
2009-08-21(svn r17248) -Fix: add GPL license notice where appropriaterubidium
2009-02-09(svn r15428) -Codechange: consistently use colour instead of having both ↵rubidium
color and colour.
2009-01-23(svn r15242) -Feature: allow moving clients between companies/spectators by ↵rubidium
the server and the clients themselves (dihedral)
2008-12-23(svn r14721) -Codechange: s/NetworkTCPSocketHandler/NetworkClientSocket/ as ↵rubidium
it's (way) more descriptive what it's used for.
2008-12-22(svn r14709) -Codechange: make a clearer distinction between 'unique' client ↵rubidium
identification ids and the indices into the clients/client info arrays.
2008-05-30(svn r13343) -Codechange: reorder/move variable/functions in the network ↵rubidium
headers so that nothing from the network directory needs to include basically all network headers.
2008-05-06(svn r12971) -Documentation: add @file in files that missed them and add ↵rubidium
something more than whitespace as description of files that don't have a description.
2007-03-07(svn r9050) -Codechange: Foo(void) -> Foo()rubidium
2007-01-12(svn r8083) -Codechange: make a NetworkSocketHandler as base for all sockets ↵rubidium
and move a little of NetworkClientState functionality to the NetworkSocketHandler. Move the rest of the NetworkClientState to the new NetworkTCPSocketHandler class/struct, which is not yet implemented in an object oriented manner. The UDP socket handler now extends the NetworkSocketHandler instead of having a reference to a NetworkClientState.
2007-01-02(svn r7759) -Merge: makefile rewrite. This merge features:rubidium
- 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.