aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs
diff options
context:
space:
mode:
authorMW2007-07-22 11:44:36 +0000
committerMW2007-07-22 11:44:36 +0000
commit70fa30204272e874b8e3acccdc2e22cd4e42b2b2 (patch)
tree2f6c3c0f3b3bd60d5972f8dea6b3abeae4dc9065 /OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs
parent* Aerobic erosion now uses Navier Stokes algorithms for wind calculations. (diff)
downloadopensim-SC_OLD-70fa30204272e874b8e3acccdc2e22cd4e42b2b2.zip
opensim-SC_OLD-70fa30204272e874b8e3acccdc2e22cd4e42b2b2.tar.gz
opensim-SC_OLD-70fa30204272e874b8e3acccdc2e22cd4e42b2b2.tar.bz2
opensim-SC_OLD-70fa30204272e874b8e3acccdc2e22cd4e42b2b2.tar.xz
* Some work in progress code: Inventory cache, start of inventory server/service, userprofile cache, inventory handling. (non of it is enabled yet (or at least it shouldn't be).
* Fixed some of the problems with crossing regions when flying: you should no longer sink to ground level when crossing (should keep roughly your right height). Should no longer sometimes get sent back to the centre of the current region when attempting to border cross. But instead sometimes you will find you avatar stop at the edge of region and you will need to start moving again to retry the crossing (which should then work). This code is partly based on Babblefrog's issue #212 patch. [I think I have some ideas of how to solve the stopping at edges problem, just want to get the inventory code done first] * Capabilities code has now been moved to the OpenSim.Framework.Communications project as some of the caps code will be tightly tied to inventory/asset handling and it was causing a two way reference problem when it was in its own project/dll. This is a Big commit as I was going to keep my inventory work local until I had it in a working state, in case it brakes anything, but its getting harder to keep in sync with svn.
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs (renamed from OpenSim/Region/Capabilities/LLSDStreamHandler.cs)84
1 files changed, 42 insertions, 42 deletions
diff --git a/OpenSim/Region/Capabilities/LLSDStreamHandler.cs b/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs
index d98e23f..7d99b6e 100644
--- a/OpenSim/Region/Capabilities/LLSDStreamHandler.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs
@@ -1,42 +1,42 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using OpenSim.Framework.Servers; 4using OpenSim.Framework.Servers;
5using System.IO; 5using System.IO;
6using System.Collections; 6using System.Collections;
7using libsecondlife; 7using libsecondlife;
8 8
9namespace OpenSim.Region.Capabilities 9namespace OpenSim.Region.Capabilities
10{ 10{
11 public class LLSDStreamhandler<TRequest, TResponse> : BaseStreamHandler 11 public class LLSDStreamhandler<TRequest, TResponse> : BaseStreamHandler
12 where TRequest : new() 12 where TRequest : new()
13 { 13 {
14 private LLSDMethod<TRequest, TResponse> m_method; 14 private LLSDMethod<TRequest, TResponse> m_method;
15 15
16 public LLSDStreamhandler(string httpMethod, string path, LLSDMethod<TRequest, TResponse> method) 16 public LLSDStreamhandler(string httpMethod, string path, LLSDMethod<TRequest, TResponse> method)
17 : base(httpMethod, path ) 17 : base(httpMethod, path )
18 { 18 {
19 m_method = method; 19 m_method = method;
20 } 20 }
21 21
22 public override byte[] Handle(string path, Stream request) 22 public override byte[] Handle(string path, Stream request)
23 { 23 {
24 //Encoding encoding = Encoding.UTF8; 24 //Encoding encoding = Encoding.UTF8;
25 //StreamReader streamReader = new StreamReader(request, false); 25 //StreamReader streamReader = new StreamReader(request, false);
26 26
27 //string requestBody = streamReader.ReadToEnd(); 27 //string requestBody = streamReader.ReadToEnd();
28 //streamReader.Close(); 28 //streamReader.Close();
29 29
30 Hashtable hash = (Hashtable)LLSD.LLSDDeserialize( request ); 30 Hashtable hash = (Hashtable)LLSD.LLSDDeserialize( request );
31 TRequest llsdRequest = new TRequest(); 31 TRequest llsdRequest = new TRequest();
32 LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest); 32 LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest);
33 33
34 TResponse response = m_method(llsdRequest); 34 TResponse response = m_method(llsdRequest);
35 35
36 Encoding encoding = new UTF8Encoding(false); 36 Encoding encoding = new UTF8Encoding(false);
37 37
38 return encoding.GetBytes( LLSDHelpers.SerialiseLLSDReply(response) ); 38 return encoding.GetBytes( LLSDHelpers.SerialiseLLSDReply(response) );
39 39
40 } 40 }
41 } 41 }
42} 42}