* 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
This commit is contained in:
John Hurliman
2009-10-13 17:33:45 -07:00
parent 395a8680c3
commit dc11643c00
11 changed files with 38 additions and 78 deletions

View File

@@ -646,7 +646,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
client.OnConnectionClosed += ConnectionClosedHandler;
// Start the IClientAPI
m_scene.ClientManager.Add(client);
client.Start();
}
else
@@ -658,10 +657,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private void RemoveClient(LLUDPClient udpClient)
{
// Remove this client from the scene ClientManager
// Remove this client from the scene
IClientAPI client;
if (m_scene.ClientManager.TryGetValue(udpClient.AgentID, out client))
Util.FireAndForget(delegate(object o) { client.Close(); });
client.Close();
}
private void AcknowledgePacket(LLUDPClient client, uint ack, int currentTime, bool fromResend)
@@ -810,19 +809,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private void LogoutHandler(IClientAPI client)
{
client.OnLogout -= LogoutHandler;
client.SendLogoutPacket();
if (client is LLClientView)
RemoveClient(((LLClientView)client).UDPClient);
}
private void ConnectionClosedHandler(IClientAPI client)
{
client.OnConnectionClosed -= ConnectionClosedHandler;
if (client is LLClientView)
RemoveClient(((LLClientView)client).UDPClient);
RemoveClient(((LLClientView)client).UDPClient);
}
}
}