mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
add a /index.php fake handler, for map. only does ?method=.. but can be extended)
This commit is contained in:
@@ -105,6 +105,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
protected ConcurrentDictionary<string, PollServiceEventArgs> m_pollHandlers =
|
||||
new ConcurrentDictionary<string, PollServiceEventArgs>();
|
||||
|
||||
protected ConcurrentDictionary<string, SimpleStreamMethod> m_indexPHPmethods = new ConcurrentDictionary<string, SimpleStreamMethod>();
|
||||
protected Dictionary<string, WebSocketRequestDelegate> m_WebSocketHandlers =
|
||||
new Dictionary<string, WebSocketRequestDelegate>();
|
||||
|
||||
@@ -535,6 +536,24 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||
return true;
|
||||
}
|
||||
|
||||
public void AddIndexPHPMethodHandler(string key, SimpleStreamMethod sh)
|
||||
{
|
||||
m_indexPHPmethods.TryAdd(key, sh);
|
||||
}
|
||||
|
||||
public void RemoveIndexPHPMethodHandler(string key)
|
||||
{
|
||||
m_indexPHPmethods.TryRemove(key, out SimpleStreamMethod sh);
|
||||
}
|
||||
|
||||
public SimpleStreamMethod TryGetIndexPHPMethodHandler(string key)
|
||||
{
|
||||
if(m_indexPHPmethods.TryGetValue(key, out SimpleStreamMethod sh))
|
||||
return sh;
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public void OnRequest(object source, RequestEventArgs args)
|
||||
{
|
||||
RequestNumber++;
|
||||
|
||||
Reference in New Issue
Block a user