Core/Network: Cleanup asio using directives

This commit is contained in:
Shauren
2023-07-15 00:43:19 +02:00
parent fce667b738
commit cdfaecda52
15 changed files with 36 additions and 54 deletions

View File

@@ -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);

View File

@@ -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;

View File

@@ -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()

View File

@@ -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);
};
}