aboutsummaryrefslogtreecommitdiff
path: root/src/server/authserver/Server/BattlenetSessionManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/authserver/Server/BattlenetSessionManager.cpp')
-rw-r--r--src/server/authserver/Server/BattlenetSessionManager.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/server/authserver/Server/BattlenetSessionManager.cpp b/src/server/authserver/Server/BattlenetSessionManager.cpp
index e16057ecbf6..91ba2b65094 100644
--- a/src/server/authserver/Server/BattlenetSessionManager.cpp
+++ b/src/server/authserver/Server/BattlenetSessionManager.cpp
@@ -16,3 +16,22 @@
*/
#include "BattlenetSessionManager.h"
+
+bool Battlenet::SessionManager::StartNetwork(boost::asio::io_service& service, std::string const& bindIp, uint16 port)
+{
+ if (!BaseSocketMgr::StartNetwork(service, bindIp, port))
+ return false;
+
+ _acceptor->AsyncAcceptManaged(&OnSocketAccept);
+ return true;
+}
+
+NetworkThread<Battlenet::Session>* Battlenet::SessionManager::CreateThreads() const
+{
+ return new NetworkThread<Session>[GetNetworkThreadCount()];
+}
+
+void Battlenet::SessionManager::OnSocketAccept(tcp::socket&& sock)
+{
+ sBattlenetSessionMgr.OnSocketOpen(std::forward<tcp::socket>(sock));
+}