aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
authorMW2008-07-21 15:13:34 +0000
committerMW2008-07-21 15:13:34 +0000
commitfb096dfbd54cfbcfa60be872cee1680eb521dd14 (patch)
treefdc6c3b4d5d15dfd03dc24138ada668e62af7562 /OpenSim/Region/Environment/Scenes
parentMantis#1801. Thank you kindly, Junta_Kohime for a patch that: (diff)
downloadopensim-SC_OLD-fb096dfbd54cfbcfa60be872cee1680eb521dd14.zip
opensim-SC_OLD-fb096dfbd54cfbcfa60be872cee1680eb521dd14.tar.gz
opensim-SC_OLD-fb096dfbd54cfbcfa60be872cee1680eb521dd14.tar.bz2
opensim-SC_OLD-fb096dfbd54cfbcfa60be872cee1680eb521dd14.tar.xz
added experimental packet tracker (LLPacketTracker.cs), which can be told to track a packet and if it hasn't been acked within a set time, trigger a IClientAPI event, that the application/scene can handle. Currently only terrain packet tracking is finished, Tracking for initial Prim packets (first full update for a prim) is being worked on. Future improvements would be to make it a more generic packet tracker with callback delegates instead of events.
Add a test event handler (which would fire after a minute if a terrain packet hadn't been acked) to scene to handle the OnUnackedTerrain event, which currently just resends the terrain patch. The idea of this packet tracking is for the region level application to be able to know if the client stack gave up on sending a packet.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs9
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs2
2 files changed, 10 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index f602e9f..c2398b6 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -2084,6 +2084,8 @@ namespace OpenSim.Region.Environment.Scenes
2084 client.OnGetScriptRunning += GetScriptRunning; 2084 client.OnGetScriptRunning += GetScriptRunning;
2085 client.OnSetScriptRunning += SetScriptRunning; 2085 client.OnSetScriptRunning += SetScriptRunning;
2086 2086
2087 client.OnUnackedTerrain += TerrainUnAcked;
2088
2087 // EventManager.TriggerOnNewClient(client); 2089 // EventManager.TriggerOnNewClient(client);
2088 } 2090 }
2089 2091
@@ -3703,5 +3705,12 @@ namespace OpenSim.Region.Environment.Scenes
3703// client.SendParcelMediaCommand((uint)(4), ParcelMediaCommandEnum.Play, 0); 3705// client.SendParcelMediaCommand((uint)(4), ParcelMediaCommandEnum.Play, 0);
3704// }); 3706// });
3705 } 3707 }
3708
3709
3710 public void TerrainUnAcked(IClientAPI client, int patchX, int patchY)
3711 {
3712 //Console.WriteLine("Terrain packet unacked, resending patch: " + patchX + " , " + patchY);
3713 client.SendLayerData(patchX, patchY, Heightmap.GetFloatsSerialised());
3714 }
3706 } 3715 }
3707} 3716}
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 156310b..253a83e 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -2085,7 +2085,7 @@ namespace OpenSim.Region.Environment.Scenes
2085 remoteClient.SendPrimitiveToClient(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalId, m_shape, 2085 remoteClient.SendPrimitiveToClient(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalId, m_shape,
2086 lPos, Velocity, Acceleration, RotationOffset, RotationalVelocity, clientFlags, m_uuid, _ownerID, 2086 lPos, Velocity, Acceleration, RotationOffset, RotationalVelocity, clientFlags, m_uuid, _ownerID,
2087 m_text, color, _parentID, m_particleSystem, m_clickAction, m_TextureAnimation, m_IsAttachment, 2087 m_text, color, _parentID, m_particleSystem, m_clickAction, m_TextureAnimation, m_IsAttachment,
2088 m_attachmentPoint,fromAssetID, Sound, SoundGain, SoundFlags, SoundRadius); 2088 m_attachmentPoint,fromAssetID, Sound, SoundGain, SoundFlags, SoundRadius, false);
2089 } 2089 }
2090 2090
2091 /// <summary> 2091 /// <summary>