direct encode terseupdates

This commit is contained in:
UbitUmarov
2019-02-27 10:07:25 +00:00
parent fe46f8cd1d
commit bcf05afd64
4 changed files with 207 additions and 37 deletions

View File

@@ -934,6 +934,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#endregion Queue or Send
}
public void SendUDPPacket(
LLUDPClient udpClient, UDPPacketBuffer buffer, ThrottleOutPacketType category, UnackedPacketMethod method, bool forcequeue)
{
bool highPriority = false;
if (category != ThrottleOutPacketType.Unknown && (category & ThrottleOutPacketType.HighPriority) != 0)
{
category = (ThrottleOutPacketType)((int)category & 127);
highPriority = true;
}
OutgoingPacket outgoingPacket = new OutgoingPacket(udpClient, buffer, category, null);
// If we were not provided a method for handling unacked, use the UDPServer default method
if ((outgoingPacket.Buffer.Data[0] & Helpers.MSG_RELIABLE) != 0)
outgoingPacket.UnackedMethod = ((method == null) ? delegate (OutgoingPacket oPacket) { ResendUnacked(oPacket); } : method);
if (!outgoingPacket.Client.EnqueueOutgoing(outgoingPacket, forcequeue, highPriority))
SendPacketFinal(outgoingPacket);
}
public void SendAcks(LLUDPClient udpClient)
{
uint ack;