aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
diff options
context:
space:
mode:
authorUbitUmarov2015-09-22 18:39:59 +0100
committerUbitUmarov2015-09-22 18:39:59 +0100
commita8dc07ff5c0ba1c09e9a5beaf76f3b078670c74f (patch)
treee3d088abe02e6a6f53cf8e5c412b0402212c7000 /OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
parentlast merging of sog m_linkedAvatars into m_sittingAvatars - untested. (diff)
downloadopensim-SC-a8dc07ff5c0ba1c09e9a5beaf76f3b078670c74f.zip
opensim-SC-a8dc07ff5c0ba1c09e9a5beaf76f3b078670c74f.tar.gz
opensim-SC-a8dc07ff5c0ba1c09e9a5beaf76f3b078670c74f.tar.bz2
opensim-SC-a8dc07ff5c0ba1c09e9a5beaf76f3b078670c74f.tar.xz
removed a protocol breaking lludp debug option that no one should try, changed terrain send throotle to be by packets in queue, reduced odds of MTU violation on terrain send (still bad). Most UDP protocol implementations may not mind much, but our code still does
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs23
1 files changed, 4 insertions, 19 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 7c5aee7..3b0c775 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -1209,8 +1209,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1209 1209
1210 public virtual bool CanSendLayerData() 1210 public virtual bool CanSendLayerData()
1211 { 1211 {
1212 int n = m_udpClient.GetCatBytesInSendQueue(ThrottleOutPacketType.Land); 1212 int n = m_udpClient.GetPacketsQueuedCount(ThrottleOutPacketType.Land);
1213 if ( n > 100000) 1213 if ( n > 256)
1214 return false; 1214 return false;
1215 return true; 1215 return true;
1216 } 1216 }
@@ -1355,15 +1355,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1355 { 1355 {
1356 try 1356 try
1357 { 1357 {
1358 /* test code using the terrain compressor in libOpenMetaverse 1358 int PatchesAssumedToFit = 3;
1359 int[] patchInd = new int[1];
1360 patchInd[0] = px + (py * Constants.TerrainPatchSize);
1361 LayerDataPacket layerpack = TerrainCompressor.CreateLandPacket(terrData.GetFloatsSerialized(), patchInd);
1362 */
1363 // Many, many patches could have been passed to us. Since the patches will be compressed
1364 // into variable sized blocks, we cannot pre-compute how many will fit into one
1365 // packet. While some fancy packing algorithm is possible, 4 seems to always fit.
1366 int PatchesAssumedToFit = 4;
1367 for (int pcnt = 0; pcnt < px.Length; pcnt += PatchesAssumedToFit) 1359 for (int pcnt = 0; pcnt < px.Length; pcnt += PatchesAssumedToFit)
1368 { 1360 {
1369 int remaining = Math.Min(px.Length - pcnt, PatchesAssumedToFit); 1361 int remaining = Math.Min(px.Length - pcnt, PatchesAssumedToFit);
@@ -1377,10 +1369,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1377 LayerDataPacket layerpack = OpenSimTerrainCompressor.CreateLandPacket(terrData, xPatches, yPatches); 1369 LayerDataPacket layerpack = OpenSimTerrainCompressor.CreateLandPacket(terrData, xPatches, yPatches);
1378 // DebugSendingPatches("SendLayerDataInternal", xPatches, yPatches); 1370 // DebugSendingPatches("SendLayerDataInternal", xPatches, yPatches);
1379 1371
1380 SendTheLayerPacket(layerpack); 1372 OutPacket(layerpack, ThrottleOutPacketType.Land);
1381 } 1373 }
1382 // LayerDataPacket layerpack = OpenSimTerrainCompressor.CreateLandPacket(terrData, px, py);
1383
1384 } 1374 }
1385 catch (Exception e) 1375 catch (Exception e)
1386 { 1376 {
@@ -1388,11 +1378,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1388 } 1378 }
1389 } 1379 }
1390 1380
1391 private void SendTheLayerPacket(LayerDataPacket layerpack)
1392 {
1393 OutPacket(layerpack, ThrottleOutPacketType.Land);
1394 }
1395
1396 /// <summary> 1381 /// <summary>
1397 /// Send the wind matrix to the client 1382 /// Send the wind matrix to the client
1398 /// </summary> 1383 /// </summary>