diff options
author | Dr Scofield | 2008-10-23 10:15:19 +0000 |
---|---|---|
committer | Dr Scofield | 2008-10-23 10:15:19 +0000 |
commit | b91857b8f7809b9bddfa5d36c1ccf84e8142d22b (patch) | |
tree | 3fd68658d7b3611b37d9b5017655f56f3c693d33 /OpenSim/Framework/Servers | |
parent | cleaning up commented lines in IRCConnector; changing access_password (diff) | |
download | opensim-SC_OLD-b91857b8f7809b9bddfa5d36c1ccf84e8142d22b.zip opensim-SC_OLD-b91857b8f7809b9bddfa5d36c1ccf84e8142d22b.tar.gz opensim-SC_OLD-b91857b8f7809b9bddfa5d36c1ccf84e8142d22b.tar.bz2 opensim-SC_OLD-b91857b8f7809b9bddfa5d36c1ccf84e8142d22b.tar.xz |
Adding AddXmlRpcHandler(name, method, bool) to selectively disable
KeepAlive for certain XmlRpc handlers.
Making use of new AddXmlRpcHandler method in RemoteAdminPlugin to
avoid clients waiting indefinitely for response.
taking note of BaseHttpServer parameter in CommunicationsManager
constructor (was passed it but then just ignored so far).
Diffstat (limited to 'OpenSim/Framework/Servers')
-rw-r--r-- | OpenSim/Framework/Servers/BaseHttpServer.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs index 7e8130a..3d125fb 100644 --- a/OpenSim/Framework/Servers/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/BaseHttpServer.cs | |||
@@ -54,6 +54,7 @@ namespace OpenSim.Framework.Servers | |||
54 | protected HttpListener m_httpListener; | 54 | protected HttpListener m_httpListener; |
55 | protected CoolHTTPListener m_httpListener2; | 55 | protected CoolHTTPListener m_httpListener2; |
56 | protected Dictionary<string, XmlRpcMethod> m_rpcHandlers = new Dictionary<string, XmlRpcMethod>(); | 56 | protected Dictionary<string, XmlRpcMethod> m_rpcHandlers = new Dictionary<string, XmlRpcMethod>(); |
57 | protected Dictionary<string, bool> m_rpcHandlersKeepAlive = new Dictionary<string, bool>(); | ||
57 | protected DefaultLLSDMethod m_defaultLlsdHandler = null; // <-- Moving away from the monolithic.. and going to /registered/ | 58 | protected DefaultLLSDMethod m_defaultLlsdHandler = null; // <-- Moving away from the monolithic.. and going to /registered/ |
58 | protected Dictionary<string, LLSDMethod> m_llsdHandlers = new Dictionary<string, LLSDMethod>(); | 59 | protected Dictionary<string, LLSDMethod> m_llsdHandlers = new Dictionary<string, LLSDMethod>(); |
59 | protected Dictionary<string, IRequestHandler> m_streamHandlers = new Dictionary<string, IRequestHandler>(); | 60 | protected Dictionary<string, IRequestHandler> m_streamHandlers = new Dictionary<string, IRequestHandler>(); |
@@ -141,6 +142,17 @@ namespace OpenSim.Framework.Servers | |||
141 | lock (m_rpcHandlers) | 142 | lock (m_rpcHandlers) |
142 | { | 143 | { |
143 | m_rpcHandlers[method] = handler; | 144 | m_rpcHandlers[method] = handler; |
145 | m_rpcHandlersKeepAlive[method] = true; // default | ||
146 | return true; | ||
147 | } | ||
148 | } | ||
149 | |||
150 | public bool AddXmlRPCHandler(string method, XmlRpcMethod handler, bool keepAlive) | ||
151 | { | ||
152 | lock (m_rpcHandlers) | ||
153 | { | ||
154 | m_rpcHandlers[method] = handler; | ||
155 | m_rpcHandlersKeepAlive[method] = keepAlive; // default | ||
144 | return true; | 156 | return true; |
145 | } | 157 | } |
146 | } | 158 | } |
@@ -584,6 +596,7 @@ namespace OpenSim.Framework.Servers | |||
584 | } | 596 | } |
585 | 597 | ||
586 | responseString = XmlRpcResponseSerializer.Singleton.Serialize(xmlRpcResponse); | 598 | responseString = XmlRpcResponseSerializer.Singleton.Serialize(xmlRpcResponse); |
599 | response.KeepAlive = m_rpcHandlersKeepAlive[methodName]; | ||
587 | } | 600 | } |
588 | else | 601 | else |
589 | { | 602 | { |