summaryrefslogtreecommitdiff
path: root/src/network/core/tcp.cpp
AgeCommit message (Collapse)Author
2021-06-13Codechange: convert printf DEBUG statements to fmt Debug statementsrubidium42
2021-05-13Codechange: [Network] split CloseSocket and CloseConnection more clearly (#9261)Patric Stout
* 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-13Codechange: remove pointless close call due to resolving virtual functions ↵Rubidium
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-12Change: reworked the debug levels for network facility (#9251)Patric Stout
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
2021-05-01Codechange: encapsulate network error handlingrubidium42
2021-04-27Change: [Network] Use string error messages instead of numeric error numbers ↵rubidium42
that need to be looked up
2021-04-27Fix: [Network] errno and strerror do not handle network errors on Windowsrubidium42
2021-04-25Codechange: differentiate between UDP, TCP and compatibility MTU valuesRubidium
2021-04-25Codechange: allow different limits in packet sizesRubidium
2021-04-24Codechange: remove public access to the next pointer in PacketRubidium
2021-04-24Codechange: move the logic shrinking of the packets into the Packet itselfRubidium
2021-04-24Codechange: encapsulate writing data from Packets into sockets/files/buffers ↵Rubidium
to prevent packet state modifications outside of the Packet
2021-04-24Codechange: encapsulate reading data from sockets into Packets to prevent ↵Rubidium
packet state modifications outside of the Packet
2021-04-24Codechange: move more logic about packet size validity and reading into PacketRubidium
2019-11-10Cleanup: Removed SVN headersS. D. Cloudt
2019-04-10Codechange: Use null pointer literal instead of the NULL macroHenry Wilson
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.
2019-03-05Remove: MorphOS / AmigaOS supportPatric Stout
In 10 years there is no commit to change how MorphOS works, and we have no active maintainer for it. It is unlikely it works in its current state (but not impossible). With the arrival of SDL2 (and removal of SDL), MorphOS is no longer support. There is an SDL2 port for MorphOS, but it is not maintained by upstream SDL2, and nobody can currently test it out. If anyone wants to re-add MorphOS, please do (revert this patch, fix the problems, and create a Pull Request). If you need any help doing so, let us know! It is not that we don't like MorphOS, it is that we don't have anyone fixing the problems :(
2014-04-23(svn r26482) -Codechange: add an include that allows us to undefine/redefine ↵rubidium
"unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
2013-11-22(svn r26046) -Fix: handle a number of failure conditions from methods called ↵rubidium
in the network code
2011-05-01(svn r22403) -Document: some more network/core coderubidium
2011-02-12(svn r22068) -Codechange/Fix: return "connection lost" instead of "okay" ↵rubidium
when SendPackets closed the connection
2010-11-30(svn r21358) -Codechange: make some network function names conform to coding ↵rubidium
style
2010-11-30(svn r21357) -Codechange: make it possible to resize the packet's bufferrubidium
2010-11-14(svn r21182) -Fix: possible just-freed memory readsrubidium
2010-10-15(svn r20939) -Fix: some MSVC warningsrubidium
2010-10-15(svn r20933) -Codechange: move some more client related methods and such to ↵rubidium
network_client.cpp
2010-01-14(svn r18801) -Fix: in some cases error messages weren't properly sent to the ↵rubidium
client before closing the connection. As a result the client would say 'connection lost' when the cause was something completely different.
2009-10-09(svn r17746) -Codechange: 'operator new' doesn't return NULL, ↵smatz
NetworkSend_Init() is useless
2009-10-07(svn r17742) -Codechange: remove unused variable from Recv_Packetrubidium
2009-10-04(svn r17693) -Cleanup: remove some unneeded includesrubidium
2009-08-21(svn r17248) -Fix: add GPL license notice where appropriaterubidium
2009-06-19(svn r16601) -Fix [FS#2880]: try 2... hopefully better this timerubidium
2009-04-07(svn r15971) -Codechange: make it possible for UDP socket handlers to bind ↵rubidium
to multiple sockets.
2009-04-07(svn r15967) -Codechange: do not access NetworkSocketHandler::has_quit directlyrubidium
2009-01-22(svn r15206) -Fix [FS#2567]: memory corruption due to not properly cleanup ↵rubidium
up the mess when cancelling a download
2009-01-20(svn r15163) -Change/Fix: use a non-blocking method to resolve the hostname ↵rubidium
and connect to game servers.
2009-01-14(svn r15079) -Codechange: split tcp 'backend' and in-game handling like it ↵rubidium
is for UDP.
2008-12-28(svn r14760) -Fix (rlongago): network connection of clients being closed ↵rubidium
twice (found due to added assertion in r14730)
2008-12-23(svn r14730) -Codechange: remove the need for networkclientsockets and ↵rubidium
networkclientinfo structs to be in a contiguous piece of memory and put them in a pool. -Note: 255 should really be enough for now... making it any more means network protocol bumps.
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-04-18(svn r12765) -Codechange: move some stuff out of variables.h that required ↵rubidium
including other headers in variables.h.
2008-01-13(svn r11828) -Codechange: include table/* as the last includes and remove an ↵rubidium
unneeded include from openttd.h.
2007-12-25(svn r11692) -Codechange: move some functions from 'functions.h' to a more ↵rubidium
logical place and remove about 50% of the includes of 'functions.h'
2007-12-25(svn r11691) -Codechange: move+rename helpers.hpp and only include it when ↵rubidium
it is really needed.
2007-02-23(svn r8857) -Documentation: Added some doxygen @file tags, repaired others ↵celestar
(the @file tag MUST be found before any line of code, that includes preprocessor directives).
2007-02-01(svn r8525) -Codechange: make NetworkSend_Packet(s) and NetworkRecv_Packet ↵rubidium
functions of NetworkTCPSocketHandler.
2007-02-01(svn r8521) -Codechange: initial step in converting Packet to a class; make ↵rubidium
and use constructors and functions related to the reading/saving the packet size.