From 0bac4b430c264741b7f9e63b5d8fb781ba306c68 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Tue, 18 Sep 2007 12:13:44 +0000 Subject: * Handlerized ViewerEffect * Now there-is-only-client-manager * First step towards moving Logout and ConnectionClosed out of Client and into something else (which will let us get rid of ClientView reference to ClientManager * General posititvity, peace, love and understanding --- OpenSim/Region/ClientStack/ClientView.cs | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'OpenSim/Region/ClientStack/ClientView.cs') diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index 2bff88a..f8ac1d8 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs @@ -71,7 +71,7 @@ namespace OpenSim.Region.ClientStack private LLUUID newAssetFolder = LLUUID.Zero; private int debug = 0; protected IScene m_scene; - private Dictionary m_clientThreads; + private ClientManager m_clientManager; private AssetCache m_assetCache; // private InventoryCache m_inventoryCache; private int cachedtextureserial = 0; @@ -83,12 +83,12 @@ namespace OpenSim.Region.ClientStack private int probesWithNoIngressPackets = 0; private int lastPacketsReceived = 0; - public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary clientThreads, IScene scene, AssetCache assetCache, PacketServer packServer, AgentCircuitManager authenSessions) + public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, ClientManager clientManager, IScene scene, AssetCache assetCache, PacketServer packServer, AgentCircuitManager authenSessions) { m_moneyBalance = 1000; m_scene = scene; - m_clientThreads = clientThreads; + m_clientManager = clientManager; m_assetCache = assetCache; m_networkServer = packServer; @@ -127,24 +127,17 @@ namespace OpenSim.Region.ClientStack # region Client Methods - public void KillClient() + public void Close() { clientPingTimer.Stop(); m_scene.RemoveClient(this.AgentId); - m_clientThreads.Remove(this.CircuitCode); + m_clientManager.Remove(this.CircuitCode); // TODO: Move out and delete ref to clientmanager. m_networkServer.RemoveClientCircuit(this.CircuitCode); this.ClientThread.Abort(); } - public void ConnectionClosed() - { - clientPingTimer.Stop(); - m_clientThreads.Remove(this.CircuitCode); - m_networkServer.RemoveClientCircuit(this.CircuitCode); - this.ClientThread.Abort(); - } #endregion # region Packet Handling @@ -259,7 +252,8 @@ namespace OpenSim.Region.ClientStack probesWithNoIngressPackets++; if (probesWithNoIngressPackets > 30) { - this.KillClient(); + // Refactor out this into an OnConnectionClosed so the ClientManager can clean up + this.Close(); } else { -- cgit v1.1