1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Initial version of antilag support

This commit is contained in:
Ivan Savenko
2025-06-28 21:42:54 +03:00
parent 58de180083
commit 3576efc3f3
24 changed files with 490 additions and 23 deletions

View File

@@ -13,8 +13,9 @@
VCMI_LIB_NAMESPACE_BEGIN
NetworkServer::NetworkServer(INetworkServerListener & listener, NetworkContext & context)
NetworkServer::NetworkServer(INetworkServerListener & listener, NetworkContext & context, NetworkStrand & strand)
: io(context)
, strand(strand)
, listener(listener)
{
}
@@ -59,7 +60,7 @@ void NetworkServer::onDisconnected(const std::shared_ptr<INetworkConnection> & c
void NetworkServer::receiveInternalConnection(std::shared_ptr<IInternalConnection> remoteConnection)
{
auto localConnection = std::make_shared<InternalConnection>(*this, io);
auto localConnection = std::make_shared<InternalConnection>(*this, strand);
connections.insert(localConnection);