More refactoring.

Changed AuthenticateSession handling, now calls a method in UDPServer. (but is likely to change again soon)
This commit is contained in:
MW
2007-05-16 15:46:22 +00:00
parent 7f42258e62
commit 3f39648605
13 changed files with 505 additions and 796 deletions

View File

@@ -24,6 +24,8 @@ using OpenSim.GenericConfig;
namespace OpenSim
{
public delegate AuthenticateResponse AuthenticateSessionHandler(LLUUID sessionID, LLUUID agentID, uint circuitCode);
public class UDPServer : OpenSimNetworkHandler
{
private Dictionary<EndPoint, uint> clientCircuits = new Dictionary<EndPoint, uint>();
@@ -45,6 +47,7 @@ namespace OpenSim
private bool m_sandbox = false;
private bool user_accounts = false;
private ConsoleBase m_console;
public AuthenticateSessionHandler AuthenticateHandler;
public PacketServer PacketServer
{
@@ -78,6 +81,7 @@ namespace OpenSim
this.user_accounts = accounts;
this.m_console = console;
PacketServer packetServer = new PacketServer(this);
this.AuthenticateHandler = new AuthenticateSessionHandler(this.m_gridServers.GridServer.AuthenticateSession);
}
protected virtual void OnReceivedData(IAsyncResult result)
@@ -178,5 +182,10 @@ namespace OpenSim
}
}
}
public virtual AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitCode)
{
return this.AuthenticateHandler(sessionID, agentID, circuitCode);
}
}
}