1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-06 02:11:06 +09:00

m_needFlushSendQueue added to prevent traversing sender channels each heartbeat

This commit is contained in:
Michael Lidgren
2015-01-20 17:39:03 +01:00
parent f95a6e02c4
commit d57f7045fe
6 changed files with 24 additions and 7 deletions

View File

@@ -5,12 +5,19 @@ namespace Lidgren.Network
internal abstract class NetSenderChannelBase
{
// access this directly to queue things in this channel
internal NetQueue<NetOutgoingMessage> m_queuedSends;
protected NetQueue<NetOutgoingMessage> m_queuedSends;
internal abstract int WindowSize { get; }
internal abstract int GetAllowedSends();
internal int QueuedSendsCount { get { return m_queuedSends.Count; } }
public int GetFreeWindowSlots()
{
return GetAllowedSends() - m_queuedSends.Count;
}
internal abstract NetSendResult Enqueue(NetOutgoingMessage message);
internal abstract void SendQueuedMessages(double now);
internal abstract void Reset();