aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP
diff options
context:
space:
mode:
authorTeravus Ovares2008-12-21 00:11:54 +0000
committerTeravus Ovares2008-12-21 00:11:54 +0000
commit119104e35bc02e15a1ce08175ca6408fb8e9f7be (patch)
tree1f206e4380b559b856f7d03da79b3aff9f5b9712 /OpenSim/Region/ClientStack/LindenUDP
parentSlowing things down even more on TPs, to see if that helps the European folks... (diff)
downloadopensim-SC_OLD-119104e35bc02e15a1ce08175ca6408fb8e9f7be.zip
opensim-SC_OLD-119104e35bc02e15a1ce08175ca6408fb8e9f7be.tar.gz
opensim-SC_OLD-119104e35bc02e15a1ce08175ca6408fb8e9f7be.tar.bz2
opensim-SC_OLD-119104e35bc02e15a1ce08175ca6408fb8e9f7be.tar.xz
* Re-implement packet tracking in IClientAPI so we can see what's going on in the client network in the simstats manager. This makes packets in per second, packets out per second, and unacked bytes work again in the simulator stats section.
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs16
1 files changed, 15 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 5ce5235..9d8ecf0 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -272,6 +272,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
272 private StartLure handlerStartLure; 272 private StartLure handlerStartLure;
273 private TeleportLureRequest handlerTeleportLureRequest; 273 private TeleportLureRequest handlerTeleportLureRequest;
274 274
275 private NetworkStats handlerNetworkStatsUpdate;
276
275 private readonly IGroupsModule m_GroupsModule; 277 private readonly IGroupsModule m_GroupsModule;
276 278
277 //private TerrainUnacked handlerUnackedTerrain = null; 279 //private TerrainUnacked handlerUnackedTerrain = null;
@@ -450,7 +452,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
450 452
451 m_PacketHandler = new LLPacketHandler(this, m_networkServer, userSettings); 453 m_PacketHandler = new LLPacketHandler(this, m_networkServer, userSettings);
452 m_PacketHandler.SynchronizeClient = SynchronizeClient; 454 m_PacketHandler.SynchronizeClient = SynchronizeClient;
453 455 m_PacketHandler.OnPacketStats += PopulateStats;
456
454 RegisterLocalPacketHandlers(); 457 RegisterLocalPacketHandlers();
455 458
456 m_clientThread = new Thread(Start); 459 m_clientThread = new Thread(Start);
@@ -572,6 +575,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
572 575
573 public void Terminate() 576 public void Terminate()
574 { 577 {
578 m_PacketHandler.OnPacketStats -= PopulateStats;
575 m_PacketHandler.Stop(); 579 m_PacketHandler.Stop();
576 580
577 // wait for thread stoped 581 // wait for thread stoped
@@ -585,6 +589,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
585 589
586 # region Packet Handling 590 # region Packet Handling
587 591
592 public void PopulateStats(int inPackets, int outPackets, int unAckedBytes)
593 {
594 handlerNetworkStatsUpdate = OnNetworkStatsUpdate;
595 if (handlerNetworkStatsUpdate != null)
596 {
597 handlerNetworkStatsUpdate(inPackets, outPackets, unAckedBytes);
598 }
599 }
600
588 public static bool AddPacketHandler(PacketType packetType, PacketMethod handler) 601 public static bool AddPacketHandler(PacketType packetType, PacketMethod handler)
589 { 602 {
590 bool result = false; 603 bool result = false;
@@ -1017,6 +1030,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1017 1030
1018 public event StartLure OnStartLure; 1031 public event StartLure OnStartLure;
1019 public event TeleportLureRequest OnTeleportLureRequest; 1032 public event TeleportLureRequest OnTeleportLureRequest;
1033 public event NetworkStats OnNetworkStatsUpdate;
1020 1034
1021 1035
1022 public void ActivateGesture(UUID assetId, UUID gestureId) 1036 public void ActivateGesture(UUID assetId, UUID gestureId)