diff options
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 16 |
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) |