1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-16 23:26:32 +09:00

Recycling problems hopefully fully fixed now. Library message now also recycled.

This commit is contained in:
Michael Lidgren
2015-02-07 17:25:54 +01:00
parent 6a0abf25c3
commit 44bc4ff06e
9 changed files with 68 additions and 41 deletions

View File

@@ -30,7 +30,14 @@ namespace Lidgren.Network
{
internal NetMessageType m_messageType;
internal bool m_isSent;
internal int m_recyclingCount; // when this reaches zero the message is ready to be recycled
// Recycling count is:
// * incremented for each recipient on send
// * incremented, when reliable, in SenderChannel.ExecuteSend()
// * decremented (both reliable and unreliable) in NetConnection.QueueSendMessage()
// * decremented, when reliable, in SenderChannel.DestoreMessage()
// ... when it reaches zero it can be recycled
internal int m_recyclingCount;
internal int m_fragmentGroup; // which group of fragments ths belongs to
internal int m_fragmentGroupTotalBits; // total number of bits in this group