* Only append ACKs to outgoing packets if one or more ACKs are successfully dequeued

* Commented out noisy CAPS debugging messages
* Added a test (under packet tests for lack of a better place) to measure Environment.TickCount resolution and fail if the resolution is not consistently under a 10ms variance

git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2813 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
John Hurliman
2009-05-27 00:29:43 +00:00
parent b49d0736cc
commit baaf1fb1f4
4 changed files with 40 additions and 13 deletions

View File

@@ -743,12 +743,17 @@ namespace OpenMetaverse
dataLength += 4;
++ackCount;
}
buffer.Data[dataLength++] = (byte)ackCount;
if (ackCount > 0)
{
// Set the last byte of the packet equal to the number of appended ACKs
buffer.Data[dataLength++] = (byte)ackCount;
// Set the appended ACKs flag on this packet
buffer.Data[0] = (byte)(buffer.Data[0] | Helpers.MSG_APPENDED_ACKS);
}
buffer.DataLength = dataLength;
// Set the appended ACKs flag on this packet
buffer.Data[0] = (byte)(buffer.Data[0] | Helpers.MSG_APPENDED_ACKS);
#endregion ACK Appending
// Add this packet to the list of ACK responses we are waiting on from the server