aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.cs
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/Scene.cs
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/Scene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs9
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}