From 23a334b9f54a1ef5df3b503c165e7b76b746a2b1 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Tue, 13 Oct 2009 14:50:03 -0700 Subject: * Rewrote ClientManager to remove Lindenisms from OpenSim core, improve performance by removing locks, and replace LLUDPClientCollection * Removed the confusing (and LL-specific) shutdowncircuit parameter from IClientAPI.Close() * Updated the LLUDP code to only use ClientManager instead of trying to synchronize ClientManager and m_clients * Remove clients asynchronously since it is a very slow operation (including a 2000ms sleep) --- OpenSim/Client/MXP/ClientStack/MXPClientView.cs | 17 +++++++++++------ OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-) (limited to 'OpenSim/Client/MXP') diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs index bc1b2e5..bc02bc4 100644 --- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs +++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs @@ -774,6 +774,11 @@ namespace OpenSim.Client.MXP.ClientStack get { return m_sessionID.CRC(); } } + public IPEndPoint RemoteEndPoint + { + get { return Session.RemoteEndPoint; } + } + public void SetDebugPacketLevel(int newDebug) { //m_debugLevel = newDebug; @@ -798,9 +803,9 @@ namespace OpenSim.Client.MXP.ClientStack OnConnectionClosed(this); } - public void Close(bool ShutdownCircuit) + public void Close() { - m_log.Info("[MXP ClientStack] Close Called with SC=" + ShutdownCircuit); + m_log.Info("[MXP ClientStack] Close Called"); // Tell the client to go SendLogoutPacket(); @@ -815,7 +820,7 @@ namespace OpenSim.Client.MXP.ClientStack public void Kick(string message) { - Close(false); + Close(); } public void Start() @@ -1448,7 +1453,7 @@ namespace OpenSim.Client.MXP.ClientStack public void Terminate() { - Close(false); + Close(); } public void SendSetFollowCamProperties(UUID objectID, SortedDictionary parameters) @@ -1615,12 +1620,12 @@ namespace OpenSim.Client.MXP.ClientStack public void Disconnect(string reason) { Kick(reason); - Close(true); + Close(); } public void Disconnect() { - Close(true); + Close(); } #endregion diff --git a/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs b/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs index 4910ab1..d5dc18f 100644 --- a/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs +++ b/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs @@ -341,7 +341,7 @@ namespace OpenSim.Client.MXP.PacketHandler m_log.Debug("[MXP ClientStack]: Adding ClientView to Scene..."); - scene.ClientManager.Add(client.CircuitCode, client); + scene.ClientManager.Add(client.AgentId, client.RemoteEndPoint, client); m_log.Debug("[MXP ClientStack]: Added ClientView to Scene."); -- cgit v1.1 From dc11643c007adf7a640ec4fbabe25995352aaa18 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Tue, 13 Oct 2009 17:33:45 -0700 Subject: * Consolidated adding / removing ClientManager IClientAPIs to two places in Scene * Added some missing implementations of IClientAPI.RemoteEndPoint * Added a ClientManager.Remove(UUID) overload * Removed a reference to a missing project from prebuild.xml --- OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs | 6 ------ 1 file changed, 6 deletions(-) (limited to 'OpenSim/Client/MXP') diff --git a/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs b/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs index d5dc18f..ba9c653 100644 --- a/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs +++ b/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs @@ -339,12 +339,6 @@ namespace OpenSim.Client.MXP.PacketHandler m_clients.Add(client); m_log.Debug("[MXP ClientStack]: Created ClientView."); - - m_log.Debug("[MXP ClientStack]: Adding ClientView to Scene..."); - scene.ClientManager.Add(client.AgentId, client.RemoteEndPoint, client); - m_log.Debug("[MXP ClientStack]: Added ClientView to Scene."); - - client.MXPSendSynchronizationBegin(m_scenes[new UUID(joinRequestMessage.BubbleId)].SceneContents.GetTotalObjectsCount()); m_log.Debug("[MXP ClientStack]: Starting ClientView..."); -- cgit v1.1