diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index ac21805..cef5f74 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | |||
@@ -328,7 +328,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
328 | /// The method to call if the packet is not acked by the client. If null, then a standard | 328 | /// The method to call if the packet is not acked by the client. If null, then a standard |
329 | /// resend of the packet is done. | 329 | /// resend of the packet is done. |
330 | /// </param> | 330 | /// </param> |
331 | public void SendPacket( | 331 | public virtual void SendPacket( |
332 | LLUDPClient udpClient, Packet packet, ThrottleOutPacketType category, bool allowSplitting, UnackedPacketMethod method) | 332 | LLUDPClient udpClient, Packet packet, ThrottleOutPacketType category, bool allowSplitting, UnackedPacketMethod method) |
333 | { | 333 | { |
334 | // CoarseLocationUpdate packets cannot be split in an automated way | 334 | // CoarseLocationUpdate packets cannot be split in an automated way |
@@ -928,6 +928,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
928 | // buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds); | 928 | // buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds); |
929 | } | 929 | } |
930 | 930 | ||
931 | /// <summary> | ||
932 | /// Send an ack immediately to the given endpoint. | ||
933 | /// </summary> | ||
934 | /// <remarks> | ||
935 | /// FIXME: Might be possible to use SendPacketData() like everything else, but this will require refactoring so | ||
936 | /// that we can obtain the UDPClient easily at this point. | ||
937 | /// </remarks> | ||
938 | /// <param name="remoteEndpoint"></param> | ||
939 | /// <param name="sequenceNumber"></param> | ||
931 | private void SendAckImmediate(IPEndPoint remoteEndpoint, uint sequenceNumber) | 940 | private void SendAckImmediate(IPEndPoint remoteEndpoint, uint sequenceNumber) |
932 | { | 941 | { |
933 | PacketAckPacket ack = new PacketAckPacket(); | 942 | PacketAckPacket ack = new PacketAckPacket(); |
@@ -936,6 +945,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
936 | ack.Packets[0] = new PacketAckPacket.PacketsBlock(); | 945 | ack.Packets[0] = new PacketAckPacket.PacketsBlock(); |
937 | ack.Packets[0].ID = sequenceNumber; | 946 | ack.Packets[0].ID = sequenceNumber; |
938 | 947 | ||
948 | SendAckImmediate(remoteEndpoint, ack); | ||
949 | } | ||
950 | |||
951 | public virtual void SendAckImmediate(IPEndPoint remoteEndpoint, PacketAckPacket ack) | ||
952 | { | ||
939 | byte[] packetData = ack.ToBytes(); | 953 | byte[] packetData = ack.ToBytes(); |
940 | int length = packetData.Length; | 954 | int length = packetData.Length; |
941 | 955 | ||