Remove INetSession

This was only used in the `CNetFileTransferer`. Only one function is
called. That can also be a `std::function`.
This commit is contained in:
phosit
2026-03-03 21:51:22 +01:00
parent e0c189a43e
commit e2dbcea487
5 changed files with 24 additions and 35 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2025 Wildfire Games.
/* Copyright (C) 2026 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@@ -36,7 +36,7 @@ constexpr int NETCLIENT_POLL_TIMEOUT = 50;
constexpr int CHANNEL_COUNT = 1;
CNetClientSession::CNetClientSession(CNetClient& client) :
m_Client(client), m_FileTransferer(this), m_Host(nullptr), m_Server(nullptr),
m_Client(client), m_FileTransferer(*this), m_Host(nullptr), m_Server(nullptr),
m_Stats(nullptr), m_IncomingMessages(16), m_OutgoingMessages(16),
m_LoopRunning(false), m_ShouldShutdown(false), m_MeanRTT(0), m_LastReceivedTime(0)
{
@@ -239,7 +239,7 @@ u32 CNetClientSession::GetMeanRTT() const
}
CNetServerSession::CNetServerSession(CNetServerWorker& server, ENetPeer* peer) :
m_Server(server), m_FileTransferer(this), m_Peer(peer), m_HostID(0), m_GUID(), m_UserName()
m_Server(server), m_FileTransferer(*this), m_Peer(peer), m_HostID(0), m_GUID(), m_UserName()
{
}