You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-19 00:26:30 +09:00
ManySample changed to better handle large amount of clients
This commit is contained in:
@@ -69,7 +69,11 @@ namespace ManyServer
|
|||||||
|
|
||||||
NetOutgoingMessage outMsg = Server.CreateMessage();
|
NetOutgoingMessage outMsg = Server.CreateMessage();
|
||||||
outMsg.Write(dstr);
|
outMsg.Write(dstr);
|
||||||
Server.SendMessage(outMsg, Server.Connections, NetDeliveryMethod.ReliableOrdered, 0);
|
|
||||||
|
var conns = Server.Connections;
|
||||||
|
|
||||||
|
// resend to ONE random connection
|
||||||
|
Server.SendMessage(outMsg, conns[NetRandom.Instance.Next(0, conns.Count)], NetDeliveryMethod.ReliableOrdered, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user