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
committerShauren <shauren.trinity@gmail.com>2025-04-08 19:15:16 +0200
commite8b2be3527c7683e8bfca70ed7706fc20da566fd (patch)
tree54d5099554c8628cad719e6f1a49d387c7eced4f /src/server/bnetserver/Server/SessionManager.h
parent40d80f3476ade4898be24659408e82aa4234b099 (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
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