aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs106
1 files changed, 70 insertions, 36 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index b0cb4ea..06f1301 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -3838,47 +3838,53 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3838 m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags, m_scene.TimeDilation)); 3838 m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags, m_scene.TimeDilation));
3839 } 3839 }
3840 3840
3841 /// <summary> 3841 /* dont use this
3842 /// Requeue an EntityUpdate when it was not acknowledged by the client. 3842 udp packet resent must be done at udp level only
3843 /// We will update the priority and put it in the correct queue, merging update flags 3843 re map from a packet to original updates just doesnt work
3844 /// with any other updates that may be queued for the same entity.
3845 /// The original update time is used for the merged update.
3846 /// </summary>
3847 private void ResendPrimUpdate(EntityUpdate update)
3848 {
3849 // If the update exists in priority queue, it will be updated.
3850 // If it does not exist then it will be added with the current (rather than its original) priority
3851 uint priority = m_prioritizer.GetUpdatePriority(this, update.Entity);
3852 3844
3853 lock (m_entityUpdates.SyncRoot) 3845 /// <summary>
3854 m_entityUpdates.Enqueue(priority, update); 3846 /// Requeue an EntityUpdate when it was not acknowledged by the client.
3855 } 3847 /// We will update the priority and put it in the correct queue, merging update flags
3848 /// with any other updates that may be queued for the same entity.
3849 /// The original update time is used for the merged update.
3850 /// </summary>
3851 private void ResendPrimUpdate(EntityUpdate update)
3852 {
3853 // If the update exists in priority queue, it will be updated.
3854 // If it does not exist then it will be added with the current (rather than its original) priority
3855 uint priority = m_prioritizer.GetUpdatePriority(this, update.Entity);
3856 3856
3857 /// <summary> 3857 lock (m_entityUpdates.SyncRoot)
3858 /// Requeue a list of EntityUpdates when they were not acknowledged by the client. 3858 m_entityUpdates.Enqueue(priority, update);
3859 /// We will update the priority and put it in the correct queue, merging update flags 3859 }
3860 /// with any other updates that may be queued for the same entity.
3861 /// The original update time is used for the merged update.
3862 /// </summary>
3863 private void ResendPrimUpdates(List<EntityUpdate> updates, OutgoingPacket oPacket)
3864 {
3865 // m_log.WarnFormat("[CLIENT] resending prim updates {0}, packet sequence number {1}", updates[0].UpdateTime, oPacket.SequenceNumber);
3866 3860
3867 // Remove the update packet from the list of packets waiting for acknowledgement
3868 // because we are requeuing the list of updates. They will be resent in new packets
3869 // with the most recent state and priority.
3870 m_udpClient.NeedAcks.Remove(oPacket.SequenceNumber);
3871 3861
3872 // Count this as a resent packet since we are going to requeue all of the updates contained in it 3862 /// <summary>
3873 Interlocked.Increment(ref m_udpClient.PacketsResent); 3863 /// Requeue a list of EntityUpdates when they were not acknowledged by the client.
3864 /// We will update the priority and put it in the correct queue, merging update flags
3865 /// with any other updates that may be queued for the same entity.
3866 /// The original update time is used for the merged update.
3867 /// </summary>
3868 private void ResendPrimUpdates(List<EntityUpdate> updates, OutgoingPacket oPacket)
3869 {
3870 // m_log.WarnFormat("[CLIENT] resending prim updates {0}, packet sequence number {1}", updates[0].UpdateTime, oPacket.SequenceNumber);
3874 3871
3875 // We're not going to worry about interlock yet since its not currently critical that this total count 3872 // Remove the update packet from the list of packets waiting for acknowledgement
3876 // is 100% correct 3873 // because we are requeuing the list of updates. They will be resent in new packets
3877 m_udpServer.PacketsResentCount++; 3874 // with the most recent state and priority.
3875 m_udpClient.NeedAcks.Remove(oPacket.SequenceNumber);
3878 3876
3879 foreach (EntityUpdate update in updates) 3877 // Count this as a resent packet since we are going to requeue all of the updates contained in it
3880 ResendPrimUpdate(update); 3878 Interlocked.Increment(ref m_udpClient.PacketsResent);
3881 } 3879
3880 // We're not going to worry about interlock yet since its not currently critical that this total count
3881 // is 100% correct
3882 m_udpServer.PacketsResentCount++;
3883
3884 foreach (EntityUpdate update in updates)
3885 ResendPrimUpdate(update);
3886 }
3887 */
3882 3888
3883// OpenSim.Framework.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>> objectUpdateBlocks = new OpenSim.Framework.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>>(); 3889// OpenSim.Framework.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>> objectUpdateBlocks = new OpenSim.Framework.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>>();
3884// OpenSim.Framework.Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>> compressedUpdateBlocks = new OpenSim.Framework.Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>>(); 3890// OpenSim.Framework.Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>> compressedUpdateBlocks = new OpenSim.Framework.Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>>();
@@ -4197,12 +4203,40 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4197 for (int i = 0; i < blocks.Count; i++) 4203 for (int i = 0; i < blocks.Count; i++)
4198 packet.ObjectData[i] = blocks[i]; 4204 packet.ObjectData[i] = blocks[i];
4199 4205
4200 OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(terseUpdates.Value, oPacket); }); 4206// OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(terseUpdates.Value, oPacket); });
4207 // use default udp retry
4208 OutPacket(packet, ThrottleOutPacketType.Task, true);
4201 } 4209 }
4202 4210
4211
4212
4203 #endregion Packet Sending 4213 #endregion Packet Sending
4214
4204 } 4215 }
4205 4216
4217 // hack.. dont use
4218 public void SendPartFullUpdate(ISceneEntity ent, uint? parentID)
4219 {
4220 if (ent is SceneObjectPart)
4221 {
4222 SceneObjectPart part = (SceneObjectPart)ent;
4223 ObjectUpdatePacket packet = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate);
4224 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
4225 packet.RegionData.TimeDilation = 1;
4226 packet.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
4227
4228 ObjectUpdatePacket.ObjectDataBlock blk = CreatePrimUpdateBlock(part, this.m_agentId);
4229 if (parentID.HasValue)
4230 {
4231 blk.ParentID = parentID.Value;
4232 }
4233
4234 packet.ObjectData[0] = blk;
4235
4236 OutPacket(packet, ThrottleOutPacketType.Task, true);
4237 }
4238 }
4239
4206 public void ReprioritizeUpdates() 4240 public void ReprioritizeUpdates()
4207 { 4241 {
4208 lock (m_entityUpdates.SyncRoot) 4242 lock (m_entityUpdates.SyncRoot)