diff options
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/Scene.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 9 |
1 files changed, 9 insertions, 0 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 | } |