mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 06:06:06 +08:00
* Completed conceptual LlsdMethod - everything resides in SimpleApp pending guru approval.
This commit is contained in:
@@ -64,7 +64,9 @@ namespace SimpleApp
|
||||
udpServer.LocalWorld = world;
|
||||
|
||||
httpServer.AddXmlRPCHandler("login_to_simulator", communicationsManager.UserServices.XmlRpcLoginMethod );
|
||||
httpServer.AddLlsdMethod<LLSDMapLayerResponse, LLSDMapRequest>("/Caps/test/", LlsdMethodDemo);
|
||||
|
||||
RegisterLlsdHandler<LLSDMapLayerResponse, LLSDMapRequest>("/Caps/test/", LlsdMethodDemo);
|
||||
|
||||
httpServer.Start();
|
||||
|
||||
m_log.WriteLine( LogPriority.NORMAL, "Press enter to quit.");
|
||||
@@ -81,7 +83,23 @@ namespace SimpleApp
|
||||
{
|
||||
return new LLSDMapLayerResponse();
|
||||
}
|
||||
|
||||
ILlsdMethodHandler m_handler;
|
||||
|
||||
private void RegisterLlsdHandler<TResponse, TRequest>( string path, LlsdMethod<TResponse, TRequest> method )
|
||||
where TRequest : new()
|
||||
{
|
||||
// path should be handler key, but for now just conceptually store it.
|
||||
m_handler = new LlsdMethodEntry<TResponse, TRequest>( method );
|
||||
}
|
||||
|
||||
private string ProcessLlsdMethod( string request,string path )
|
||||
{
|
||||
LlsdMethodEntry<LLSDMapLayerResponse, LLSDMapRequest> concreteHandler = new LlsdMethodEntry<LLSDMapLayerResponse, LLSDMapRequest>( LlsdMethodDemo );
|
||||
|
||||
return m_handler.Handle(request, path);
|
||||
}
|
||||
|
||||
private bool AddNewSessionHandler(ulong regionHandle, Login loginData)
|
||||
{
|
||||
m_log.WriteLine(LogPriority.NORMAL, "Region [{0}] recieved Login from [{1}] [{2}]", regionHandle, loginData.First, loginData.Last);
|
||||
|
||||
Reference in New Issue
Block a user