summaryrefslogtreecommitdiff
path: root/src/network/core
AgeCommit message (Collapse)Author
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-26Fix 8a95fee4: Missing initialiser in Packet constructorCharles Pigott
2021-04-25Change: use 32 KiB packets to transfer the savegameRubidium
2021-04-25Codechange: differentiate between UDP, TCP and compatibility MTU valuesRubidium
2021-04-25Codechange: allow different limits in packet sizesRubidium
2021-04-24Codechange: use std::vector instead of a fixed size array for PacketsRubidium
2021-04-24Codechange: add accessor for the packet type to Packet and make the internal ↵Rubidium
state of Packet private
2021-04-24Codechange: remove public access to the next pointer in PacketRubidium
2021-04-24Codechange: encapsulate reading the size of a PacketRubidium
2021-04-24Codechange: encapsulate the logic about how many bytes can be sent from a ↵Rubidium
buffer in to a Packet
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 logic whether there is enough space in a packet to write ↵Rubidium
data into the Packet
2021-04-24Codechange: move more logic about packet size validity and reading into PacketRubidium
2021-04-20Doc: server name doesn't need to be advertised to be validPatric Stout
Strictly seen the comment is true, as it says 'e.g.', but it is misleading. The server name is just that: the name of the server as configured. No need to mention advertising.
2021-04-20Codechange: remove always-empty "address" from NetworkContentSocketHandlerPatric Stout
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-20Codechange: split ParseConnectionString into two functionsPatric Stout
One also looks for a company, the other doesn't. There were more uses of the latter than the first, leaving very weird code all over the place.
2021-04-20Remove: "language" field from server/clientPatric Stout
The original idea was that people could find a server they could talk in their native language on. This isn't really used in that way. There are several reasons for removing this: - the client also sends his "language" to the server, but nothing is doing anything with this. - flags are a bad way to represent languages, and over the years we had several (rightfully) complaints about this. - most servers have their language set to "All", and prefix the servername with the language it is about. This is a much more efficient way to do the same. All in all, this feature should go back to the drawing board. Maybe it could work in another form, but this form is not it.
2021-04-20Remove: "map_name" from server announcements / listingPatric Stout
The idea back in the days was nice, but it never resulted in anything useful. Most servers either read "(loaded game)" or "Random Map", neither being useful. It was meant for heightmaps, so you could find a server that was using a specific one .. but there are many things wrong with that idea. Mostly, servers tend to save and load savegames from time to time, after which the original heightmap used was lost. All in all, removing map_name all together is just better.
2021-04-12Change: warn the user about the resolving of an address being extra very slowRubidium
2021-04-07Fix #8713: Change OTTD2FS and FS2OTTD to return string objects instead of ↵Niels Martin Hansen
static buffers
2021-02-27Codechange: [Network] replace _realtime_tick with std::chronoPatric Stout
2021-01-08Codechange: Remove min/max functions in favour of STL variants (#8502)Charles Pigott
2020-12-27Codechange: Replace assert_compile macro with static_assertCharles Pigott
2020-12-15Fix: workarounds for two emscripten bugs in the network stackPatric Stout
2020-12-15Add: support for emscripten (play-OpenTTD-in-the-browser)Patric Stout
Emscripten compiles to WASM, which can be loaded via HTML / JavaScript. This allows you to play OpenTTD inside a browser. Co-authored-by: milek7 <me@milek7.pl>
2020-06-27Doc: Acknowledge integer type mismatch in certain admin packets using ↵duck
AdminUpdateType (#8238)
2020-06-21Fix: Thread unsafe use of NetworkAddress::GetAddressAsStringJonathan G Rennison
Remove static buffer form of NetworkAddress::GetAddressAsString. This is used in multiple threads concurrently, and is not thread-safe. Replace it with a form returning std::string.
2020-06-18Fix: Racy use of flags in TCPConnecter::CheckCallbacksJonathan G Rennison
conected and aborted flags are used concurrently from multiple threads.
2020-06-05Add: introduce CMake for project managementPatric Stout
CMake works on all our supported platforms, like MSVC, Mingw, GCC, Clang, and many more. It allows for a single way of doing things, so no longer we need shell scripts and vbs scripts to work on all our supported platforms. Additionally, CMake allows to generate project files for like MSVC, KDevelop, etc. This heavily reduces the lines of code we need to support multiple platforms from a project perspective. Addtiionally, this heavily improves our detection of libraries, etc.
2020-05-07Fix #8117: Memory leak in admin port (#8122)glx22
2019-12-21Codechange: Replace network related FOR_ALL with range-based for loopsglx
2019-11-10Cleanup: Removed SVN headersS. D. Cloudt
2019-10-07Fix: [Cygwin] Fix missing AI_ADDRCONFIG declarationJoe Stringer
Fixes the following complaints: src/network/core/address.cpp: In member function 'const sockaddr_storage* NetworkAddress::GetAddress()': src/network/core/address.cpp:134:55: error: 'AI_ADDRCONFIG' was not declared in this scope this->Resolve(this->address.ss_family, SOCK_STREAM, AI_ADDRCONFIG, nullptr, ResolveLoopProc); Signed-off-by: Joe Stringer <joe@wand.net.nz>
2019-09-30Fix: GCC9's warnings about deprecated implicit assignment operatorsCharles Pigott
2019-04-27Fix #7165: Missed another 'Append() --> push_back()' replacement (#7548)PeterN
2019-04-10Codechange: Use null pointer literal instead of the NULL macroHenry Wilson
2019-04-09Codechange: If something is a vector of strings, use a vector of strings ↵Michael Lutz
instead of an AutoFreeSmallVector.
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-26Fix #7165: Missed 'Append() --> push_back()' replacementstormcone
2019-03-26Cleanup: Remove unused size template parameters from SmallMap and ↵Henry Wilson
Auto[Free|Delete]SmallVector
2019-03-26Codechange: Removed SmallVector completelyHenry Wilson
2019-03-26Codechange: Replaced SmallVector::[Begin|End]() with std alternativesHenry Wilson
2019-03-26Codechange: Replaced SmallVector::Find() with std::find()Henry Wilson
2019-03-26Codechange: Replaced SmallVector::Append() with ↵Henry Wilson
std::vector::[push|emplace]_back()
2019-03-26Codechange: Replaced SmallVector::Erase() with std::vector::erase()Henry Wilson
2019-03-26Codechange: Replaced SmallVector::Find() const with suitable alternativesHenry Wilson
The use of std::none_of in network/core/host.cpp is driven by the non-const comparison operator use by NetworkAddress. A future commit should address the const_casts in that class to ensure const-correctness.
2019-03-26Codechange: Replace SmallVector::Length() with std::vector::size()Henry Wilson