Commit Graph

94 Commits

Author SHA1 Message Date
Shauren
df02bec2a1 Core/Network: Minor include cleanup in SocketConnectionInitializer related files 2025-09-22 16:12:01 +02:00
Shauren
74d9da7f32 Core/Network: Make ip address formattable with fmt 2025-06-02 18:38:41 +02:00
Shauren
71b681bbf0 Core/Network: Move to separate project 2025-04-09 21:02:31 +02:00
Shauren
e8b2be3527 Core/Network: Socket refactors
* Devirtualize calls to Read and Update by marking concrete implementations as final
* Removed derived class template argument
* Specialize boost::asio::basic_stream_socket for boost::asio::io_context instead of type-erased any_io_executor
* Make socket initialization easier composable (before entering Read loop)
* Remove use of deprecated boost::asio::null_buffers and boost::beast::ssl_stream
2025-04-08 19:15:16 +02:00
Shauren
c81183a660 Dep: Replace basic_deadline_timer with std::chrono based basic_waitable_timer 2024-12-09 21:13:18 +01:00
Shauren
af4dcc93ed Core/Networking: Support IPv6 2024-11-12 13:54:43 +01:00
Shauren
f847cd4eeb Core/Networking: Fixed Socket::DelayedCloseSocket not working if write queue is empty when its called on linux and mac
Closes #29887
2024-04-03 21:23:30 +02:00
Shauren
ac5aee6a98 Core: Updated to 10.2.6.53840 2024-03-21 21:07:23 +01:00
Shauren
623202d68e Core/Bnet: Implemented new SRP6 variants, and migrate old sha_pass_hash in battlenet_accounts to separate salt and verifier columns
* passwords can now be case sensitive and up to 128 characters long
2023-12-26 14:55:15 +01:00
Shauren
15fce17c1a Core/Bnet: Add new loggers to config file template, fixed request/response content logging and fixed setting keep_alive on responses 2023-12-18 12:19:10 +01:00
Shauren
acb5fbd48b Core/Bnet: Rewrite LoginRESTService using boost::beast instead of gsoap as http backend and extract generic http code to be reusable elsewhere 2023-12-17 23:21:10 +01:00
Shauren
5f00ac4b2b Core/Misc: Minor refactors in BaseEncoding and SslSocket to prepare for future bnetserver changes 2023-12-16 20:02:20 +01:00
Shauren
78bcc3f52a Core/Misc: Minor code modernization - kill std::bind 2023-12-08 20:27:41 +01:00
Shauren
cdfaecda52 Core/Network: Cleanup asio using directives 2023-07-15 00:43:19 +02:00
Shauren
7b31080258 Core/Misc: Modernize code a bit by replacing std::tie with either structured bindings or operator<=> 2023-04-06 17:46:58 +02:00
Shauren
d791afae1d Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard compatible api) 2023-01-08 21:16:53 +01:00
Shauren
f6e72494f1 Dep: Raise required boost versions to 1.73 on windows and 1.71 on linux and remove compatibility code for unsupported versions 2022-02-14 12:43:57 +01:00
Shauren
439b027d48 Core/Misc: Cleanup unused includes 2022-02-13 15:07:00 +01:00
Shauren
d2cde75ab2 Core/Networking: Fixed authserver socket read handlers being called on incorrect thread
(cherry picked from commit 3ad05386c8)
2022-01-24 13:15:13 +01:00
Shauren
3a67e37681 Core/Time: Remove artificially high minimal update intervals 2022-01-03 11:26:23 +01:00
jackpoz
f83601de2f Core/Networking: Set SO_REUSEADDR on *nix platforms
(cherry picked from commit 46f2595f51)
2021-11-21 20:16:26 +01:00
Giacomo Pozzoni
9668096056 Core/Networking: Fix memory leak (#22923)
Fix memory leak reported by ASan happening when ports fail to bind in Authserver

(cherry picked from commit 57d7b19452)
2021-11-21 13:54:27 +01:00
Aokromes
b0bf1275ee New Year 2020-01-02 06:44:10 +01:00
Shauren
bcda8dd742 Core/Dep: Boost 1.70 compatibility 2019-04-14 00:13:23 +02:00
vincent-michael
5620eb9463 Update copyright note for 2019
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
Shauren
dfd2660a85 Core/Misc: Added compatibility layer for boost 1.66 and future std:: networking stuff
* Based on work done by @dimiandre in PR #21173

Closes #21171
Closes #21173
2018-01-06 01:21:59 +01:00
vincent-michael
7d00ae4045 Update copyright note for 2018
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
Shauren
9711dd3f70 Core/Networking: Activate single threaded optimization for io_service running in NetworkThread 2017-08-15 23:55:41 +02:00
Shauren
beb3316089 Core/Shared: Include cleanup 2017-05-13 11:49:09 +02:00
Gacko
7aa32a4d6b Fix build. 2017-05-04 21:49:48 +02:00
Shauren
6c92a481a3 Core/Misc: Cleanup worldserver/bnetserver main() functions to run destructors in predictable order
* world/bnet servers will now fail to startup if listen ports are in use
* Restored "Network.OutUBuff" config option lost during boost transition
2017-05-04 20:41:22 +02:00
vincent-michael
86b98686a9 Update copyright note for 2017
Happy new year
2017-01-01 16:23:13 +01:00
DDuarte
423bded9a6 Core/Network: Change SocketMgr.StartNetwork to take the thread count by arg instead of config
AuthSocketMgr doesn't need "Network.Threads" config

Fixes "Missing name Network.Threads in config file authserver.conf"

Ref #16859

(cherry picked from commit 980f28d2ce)

# Conflicts:
#	src/server/authserver/Server/AuthSocketMgr.h
#	src/server/game/Server/WorldSocketMgr.cpp
2016-03-28 02:36:58 +01:00
Shauren
60a4914c33 Core/Networking: Added SslSocket wrapper for boost::asio::ssl::stream 2016-03-26 18:52:32 +01:00
Shauren
a81a204678 Core/Common: Moved MessageBuffer to common 2016-03-26 17:15:20 +01:00
Naios
ef75a2e731 Core/Shared: Fix no PCH build
(cherry picked from commit 5ac4507c87)
2016-03-19 23:19:59 +01:00
Shauren
0daba931ef Core/Networking: Fixed DelayedCloseSocket when compiled without TC_SOCKET_USE_IOCP (linux)
Closes #16769
2016-03-12 19:43:07 +01:00
Shauren
f123c39659 Core/Networking: Added new AsyncRead method to Socket class allowing to pass a custom completion handler and refactor world socket initialization string handling 2016-03-10 23:33:56 +01:00
Shauren
3829a73e14 Final build fix for gcc 4.7 (no longer supported in 8 days)
(cherry picked from commit 2345e84855)
2016-02-21 14:24:37 +01:00
Shauren
97a79af470 Core/Networking: Rewrite networking threading model
Each network thread has its own io_service - this means that all operations on a given socket except queueing packets run from a single thread, removing the need for locking
Sending packets now writes to a lockfree intermediate queue directly, encryption is applied in network thread if it was required at the time of sending the packet
2016-02-19 19:23:04 +01:00
Vincent-Michael
478cc756eb Update copyright note for 2016
Happy new year (Again new year with idiots ...)
2016-01-01 00:34:25 +01:00
Shauren
590c6e399d Core/Networking: Fixed possible crashes happening if async query retrieving account data takes too long
Closes #14944
2015-08-09 15:30:06 +02:00
Shauren
f6bc87fe5d Core/Threading: Fixed possible data races after making auth queries async by moving their processing to boost::asio::io_service::run threads 2015-06-21 02:13:08 +02:00
Shauren
e4abbc0926 Core/Networking: Fixed possible msvc debug assertions in vector 2015-05-02 00:02:57 +02:00
Shauren
59e9bcf0bf Core/Socket: Removed unused synchronous read method 2015-04-24 00:10:04 +02:00
Shauren
5659db6f03 Core/Bnet: Fixed crash on shutdown happening when there were still players connected 2015-04-11 01:55:45 +02:00
Shauren
76cbf05a2e Misc: Fixed license header formatting 2015-04-04 13:11:32 +02:00
Shauren
bed88e0dd4 Core/Networking: Fixed unsafe access to _worldSession member in WorldSocket 2015-03-28 21:45:27 +01:00
Shauren
5ac0b7844c Core/PacketIO: Implemented CMSG_ENABLE_NAGLE 2015-03-28 20:51:01 +01:00
click
be078fd8a9 Core: WARN instead of INFO - this is actually something we'd want to be informed of...
(cherry picked from commit d5718f3372)
2015-03-18 00:33:20 +00:00