mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Network: Cleanup asio using directives
This commit is contained in:
@@ -69,7 +69,7 @@ void Battlenet::Session::GameAccountInfo::LoadResult(Field* fields)
|
||||
DisplayName = Name;
|
||||
}
|
||||
|
||||
Battlenet::Session::Session(tcp::socket&& socket) : BattlenetSocket(std::move(socket)), _accountInfo(new AccountInfo()), _gameAccountInfo(nullptr), _locale(),
|
||||
Battlenet::Session::Session(boost::asio::ip::tcp::socket&& socket) : BattlenetSocket(std::move(socket)), _accountInfo(new AccountInfo()), _gameAccountInfo(nullptr), _locale(),
|
||||
_os(), _build(0), _ipCountry(), _authed(false), _requestToken(0)
|
||||
{
|
||||
_headerLengthBuffer.Resize(2);
|
||||
|
||||
@@ -28,8 +28,6 @@
|
||||
#include <google/protobuf/message.h>
|
||||
#include <memory>
|
||||
|
||||
using boost::asio::ip::tcp;
|
||||
|
||||
namespace pb = google::protobuf;
|
||||
|
||||
class ServiceBase;
|
||||
@@ -111,7 +109,7 @@ namespace Battlenet
|
||||
std::unordered_map<uint32, GameAccountInfo> GameAccounts;
|
||||
};
|
||||
|
||||
explicit Session(tcp::socket&& socket);
|
||||
explicit Session(boost::asio::ip::tcp::socket&& socket);
|
||||
~Session();
|
||||
|
||||
void Start() override;
|
||||
|
||||
@@ -35,9 +35,9 @@ NetworkThread<Battlenet::Session>* Battlenet::SessionManager::CreateThreads() co
|
||||
return new NetworkThread<Session>[GetNetworkThreadCount()];
|
||||
}
|
||||
|
||||
void Battlenet::SessionManager::OnSocketAccept(tcp::socket&& sock, uint32 threadIndex)
|
||||
void Battlenet::SessionManager::OnSocketAccept(boost::asio::ip::tcp::socket&& sock, uint32 threadIndex)
|
||||
{
|
||||
sSessionMgr.OnSocketOpen(std::forward<tcp::socket>(sock), threadIndex);
|
||||
sSessionMgr.OnSocketOpen(std::forward<boost::asio::ip::tcp::socket>(sock), threadIndex);
|
||||
}
|
||||
|
||||
Battlenet::SessionManager& Battlenet::SessionManager::Instance()
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Battlenet
|
||||
NetworkThread<Session>* CreateThreads() const override;
|
||||
|
||||
private:
|
||||
static void OnSocketAccept(tcp::socket&& sock, uint32 threadIndex);
|
||||
static void OnSocketAccept(boost::asio::ip::tcp::socket&& sock, uint32 threadIndex);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user