Jonathan G Rennison
cb421294bb
Network: Log sent packets at net=5
3 years ago
Jonathan G Rennison
ad0e085ec7
Fix off by one error in Packet::CanWriteToPacket
3 years ago
Jonathan G Rennison
1002c6d9d2
Fix various compiler warnings
...
See: #267
3 years ago
Jonathan G Rennison
97d5982cb5
Fix various compiler warnings
...
See: #267
3 years ago
Rubidium
e227bbaff0
Cleanup: remove the old FIO slot functions
...
(cherry picked from commit fa6abe1646
)
3 years ago
Jonathan G Rennison
66289bbda4
Log packet size parse failures in NetworkTCPSocketHandler
3 years ago
Jonathan G Rennison
6d58115458
Net: Log sent and received game packets with type and status names
3 years ago
Jonathan G Rennison
7677d2d01a
Fix mishandling of PACKET_SERVER_MAP_BEGIN queuing at server
...
This could result in broken packet framing in the TCP stream
3 years ago
Milek7
7ab6ab7400
Fix: missing <limits> include in network/core/packet.h ( #9123 )
...
(cherry picked from commit a341852cd5
)
3 years ago
Jonathan G Rennison
f3e0507c54
Network: Include extra info in PACKET_CLIENT_ERROR packets
...
Log more details in server when PACKET_CLIENT_ERROR received
3 years ago
Jonathan G Rennison
e04218b528
Network: Log received packets at log level net=3
3 years ago
Jonathan G Rennison
a9515456cb
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/network/core/os_abstraction.h
# src/network/core/tcp_content.h
# src/network/core/udp.cpp
# src/table/currency_settings.ini
# src/table/settings.h.preamble
3 years ago
Patric Stout
8fa53f543a
Change: [Network] lower TCP connect() timeout to 3s ( #9112 )
...
Currently we use default OS timeout for TCP connections, which
is around 30s. 99% of the users will never notice this, but there
are a few cases where this is an issue:
- If you have a broken IPv6 connection, using Content Service is
first tried over IPv6. Only after 30s it times out and tries
IPv4. Nobody is waiting for that 30s.
- Upcoming STUN support has several methods of establishing a
connection between client and server. This requires feedback
from connect() to know if any method worked (they have to be
tried one by one). With 30s, this would take a very long time.
What is good to mention, is that there is no good value here. Any
value will have edge-cases where the experience is suboptimal. But
with 3s we support most of the stable connections, and if it fails,
the user can just retry. On the other side of the spectrum, with 30s,
it means the user has no possibility to use the service. So worst case
we annoy a few users with them having the retry vs annoying a few
users which have no means of resolving the situation.
3 years ago
rubidium42
015e3b412e
Cleanup: remove #ifdefs for compiling the old content server
3 years ago
rubidium42
84985c1223
Codechange: [Network] Do not leak os_abstraction.h via fios.h
3 years ago
rubidium42
cf8c1aa860
Change: [Network] Use string error messages instead of numeric error numbers that need to be looked up
3 years ago
rubidium42
65c5a64719
Fix: [Network] errno and strerror do not handle network errors on Windows
3 years ago
Charles Pigott
43b6f6915b
Fix 8a95fee4: Missing initialiser in Packet constructor
3 years ago
Jonathan G Rennison
8eb27e1ac7
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/company_cmd.cpp
# src/lang/japanese.txt
# src/network/core/config.h
# src/network/core/packet.cpp
# src/network/core/tcp.cpp
# src/network/network_content.cpp
# src/network/network_server.cpp
# src/network/network_udp.cpp
# src/toolbar_gui.cpp
# src/vehicle_gui_base.h
3 years ago
Jonathan G Rennison
66fda55ec4
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/company_cmd.cpp
# src/network/core/packet.cpp
# src/network/core/packet.h
# src/network/core/tcp.cpp
# src/network/core/udp.cpp
# src/network/network_server.cpp
# src/network/network_server.h
# src/toolbar_gui.cpp
# src/vehicle_gui_base.h
3 years ago
Rubidium
21f58ab437
Change: use 32 KiB packets to transfer the savegame
3 years ago
Rubidium
d6000c2ec5
Codechange: differentiate between UDP, TCP and compatibility MTU values
3 years ago
Rubidium
8b302761d4
Codechange: allow different limits in packet sizes
3 years ago
Jonathan G Rennison
ba418f9d0d
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/lang/simplified_chinese.txt
# src/network/core/tcp_content.cpp
# src/network/core/udp.cpp
# src/network/network_server.cpp
# src/saveload/linkgraph_sl.cpp
# src/table/gameopt_settings.ini
3 years ago
Rubidium
75386873b7
Codechange: use std::vector instead of a fixed size array for Packets
3 years ago
Rubidium
450178d780
Codechange: add accessor for the packet type to Packet and make the internal state of Packet private
3 years ago
Rubidium
3abefdf561
Codechange: remove public access to the next pointer in Packet
3 years ago
Rubidium
f71fb0f54a
Codechange: encapsulate reading the size of a Packet
3 years ago
Rubidium
6f161f6559
Codechange: encapsulate the logic about how many bytes can be sent from a buffer in to a Packet
3 years ago
Rubidium
38d15fc9b7
Codechange: move the logic shrinking of the packets into the Packet itself
3 years ago
Rubidium
d4f027c03b
Codechange: encapsulate writing data from Packets into sockets/files/buffers to prevent packet state modifications outside of the Packet
3 years ago
Rubidium
98aa561cf7
Codechange: encapsulate reading data from sockets into Packets to prevent packet state modifications outside of the Packet
3 years ago
Rubidium
a2051bad50
Codechange: move logic whether there is enough space in a packet to write data into the Packet
3 years ago
Rubidium
c545cc9d70
Codechange: move more logic about packet size validity and reading into Packet
3 years ago
Jonathan G Rennison
0d262e4d9a
Send network client desync log messages to server
3 years ago
Patric Stout
ce6a744278
Doc: server name doesn't need to be advertised to be valid
...
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.
3 years ago
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.
3 years ago
Patric Stout
31897eaa7d
Codechange: split ParseConnectionString into two functions
...
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.
3 years ago
Patric Stout
05612d60ae
Remove: "language" field from server/client
...
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.
3 years ago
Patric Stout
f4bd3fff5e
Remove: "map_name" from server announcements / listing
...
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.
3 years ago
Jonathan G Rennison
253d54ce05
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/lang/french.txt
# src/network/network_udp.cpp
3 years ago
Rubidium
d2fe8c2842
Change: warn the user about the resolving of an address being extra very slow
3 years ago
Jonathan G Rennison
227041008f
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/debug.cpp
# src/lang/russian.txt
# src/misc_gui.cpp
# src/os/windows/crashlog_win.cpp
# src/os/windows/font_win32.cpp
# src/os/windows/win32.cpp
# src/rail_cmd.cpp
# src/window_gui.h
4 years ago
Niels Martin Hansen
e0561dbded
Fix #8713 : Change OTTD2FS and FS2OTTD to return string objects instead of static buffers
4 years ago
Jonathan G Rennison
4361a6dbf4
Avoid undefined behaviour const_casting std::string c_str()
...
Use non-const data() instead
See: #224
4 years ago
Patric Stout
d4f208d9c1
Codechange: [Network] replace _realtime_tick with std::chrono
...
(cherry picked from commit 53c28a8ec9
)
4 years ago
Patric Stout
53c28a8ec9
Codechange: [Network] replace _realtime_tick with std::chrono
4 years ago
Jonathan G Rennison
b7ddd486cf
Merge branch 'master' into jgrpp
...
# Conflicts:
# cmake/CompileFlags.cmake
# src/aircraft_cmd.cpp
# src/blitter/32bpp_anim.cpp
# src/cargopacket.cpp
# src/cheat_gui.cpp
# src/company_cmd.cpp
# src/company_gui.cpp
# src/core/pool_func.hpp
# src/date.cpp
# src/economy.cpp
# src/error_gui.cpp
# src/ground_vehicle.cpp
# src/ground_vehicle.hpp
# src/group_gui.cpp
# src/industry_cmd.cpp
# src/lang/dutch.txt
# src/lang/french.txt
# src/lang/german.txt
# src/linkgraph/linkgraph_gui.cpp
# src/linkgraph/mcf.cpp
# src/network/network_content.cpp
# src/network/network_server.cpp
# src/network/network_udp.cpp
# src/newgrf_engine.cpp
# src/newgrf_station.cpp
# src/order_cmd.cpp
# src/order_gui.cpp
# src/pathfinder/follow_track.hpp
# src/pathfinder/yapf/yapf_common.hpp
# src/saveload/saveload.cpp
# src/settings_gui.cpp
# src/station_cmd.cpp
# src/station_kdtree.h
# src/string_func.h
# src/table/settings.ini
# src/tgp.cpp
# src/timetable_cmd.cpp
# src/timetable_gui.cpp
# src/toolbar_gui.cpp
# src/town_cmd.cpp
# src/train_cmd.cpp
# src/train_gui.cpp
# src/tree_gui.cpp
# src/tunnelbridge_cmd.cpp
# src/vehicle.cpp
# src/vehicle_gui.cpp
# src/video/sdl2_v.cpp
# src/video/sdl_v.cpp
# src/video/win32_v.cpp
# src/viewport.cpp
# src/viewport_sprite_sorter_sse4.cpp
# src/window.cpp
4 years ago
Jonathan G Rennison
6c3e5642f8
Merge branch 'master' into jgrpp
...
# Conflicts:
# cmake/CompileFlags.cmake
# src/crashlog.cpp
# src/fileio.cpp
# src/fileio_func.h
# src/fios_gui.cpp
# src/ini_load.cpp
# src/ini_type.h
# src/lang/english.txt
# src/lang/german.txt
# src/lang/korean.txt
# src/network/network_client.cpp
# src/order_base.h
# src/order_cmd.cpp
# src/os/windows/win32.cpp
# src/road_cmd.cpp
# src/saveload/saveload.cpp
# src/saveload/saveload.h
# src/settings.cpp
# src/station_cmd.cpp
# src/stdafx.h
# src/table/settings.ini
# src/tree_cmd.cpp
# src/tree_gui.cpp
# src/vehicle_base.h
# src/video/cocoa/cocoa_v.mm
# src/video/cocoa/event.mm
# src/video/cocoa/wnd_quartz.mm
# src/viewport.cpp
# src/widgets/tree_widget.h
4 years ago
Jonathan G Rennison
43980639de
Merge branch 'master' into jgrpp
...
# Conflicts:
# .gitignore
# CMakeLists.txt
# src/3rdparty/optional/optional.hpp
# src/group_cmd.cpp
# src/industry_cmd.cpp
# src/misc_gui.cpp
# src/video/sdl2_v.cpp
4 years ago