aboutsummaryrefslogtreecommitdiff
path: root/src/server/bnetserver/Server/SessionManager.h
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2025-04-08 19:15:16 +0200
committerOvahlord <dreadkiller@gmx.de>2025-04-08 19:57:45 +0200
commit4aa991e7e4450232df4ceda0b2f439bccce1d260 (patch)
tree6ba65344105e100dd29da50cb667a53c465252a7 /src/server/bnetserver/Server/SessionManager.h
parenta28b2999b1b500185aeecf343c3b1e14a39c26cf (diff)
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 (cherry picked from commit e8b2be3527c7683e8bfca70ed7706fc20da566fd)
Diffstat (limited to 'src/server/bnetserver/Server/SessionManager.h')
-rw-r--r--src/server/bnetserver/Server/SessionManager.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/server/bnetserver/Server/SessionManager.h b/src/server/bnetserver/Server/SessionManager.h
index c635122c977..528ece8739e 100644
--- a/src/server/bnetserver/Server/SessionManager.h
+++ b/src/server/bnetserver/Server/SessionManager.h
@@ -15,15 +15,15 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef SessionManager_h__
-#define SessionManager_h__
+#ifndef TRINITYCORE_SESSION_MANAGER_H
+#define TRINITYCORE_SESSION_MANAGER_H
#include "SocketMgr.h"
#include "Session.h"
namespace Battlenet
{
- class SessionManager : public SocketMgr<Session>
+ class SessionManager : public Trinity::Net::SocketMgr<Session>
{
typedef SocketMgr<Session> BaseSocketMgr;
@@ -33,13 +33,10 @@ namespace Battlenet
bool StartNetwork(Trinity::Asio::IoContext& ioContext, std::string const& bindIp, uint16 port, int threadCount = 1) override;
protected:
- NetworkThread<Session>* CreateThreads() const override;
-
- private:
- static void OnSocketAccept(boost::asio::ip::tcp::socket&& sock, uint32 threadIndex);
+ Trinity::Net::NetworkThread<Session>* CreateThreads() const override;
};
}
#define sSessionMgr Battlenet::SessionManager::Instance()
-#endif // SessionManager_h__
+#endif // TRINITYCORE_SESSION_MANAGER_H