aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs
diff options
context:
space:
mode:
authorlbsa712007-10-30 09:05:31 +0000
committerlbsa712007-10-30 09:05:31 +0000
commit67e12b95ea7b68f4904a7484d77ecfd787d16d0c (patch)
tree20b00d24c8a7617017960432ec044852e3ad5fa9 /OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs
parent* Deleted .user file (diff)
downloadopensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.zip
opensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.gz
opensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.bz2
opensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.xz
* Optimized usings
* Shortened type references * Removed redundant 'this' qualifier
Diffstat (limited to 'OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs')
-rw-r--r--OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs19
1 files changed, 8 insertions, 11 deletions
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs b/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs
index 894b276..08e9563 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs
@@ -26,13 +26,11 @@
26* 26*
27*/ 27*/
28 28
29using System;
30using System.Collections.Generic;
31using System.Text;
32using OpenSim.Framework.Servers;
33using System.IO;
34using System.Collections; 29using System.Collections;
30using System.IO;
31using System.Text;
35using libsecondlife; 32using libsecondlife;
33using OpenSim.Framework.Servers;
36 34
37namespace OpenSim.Region.Capabilities 35namespace OpenSim.Region.Capabilities
38{ 36{
@@ -42,11 +40,11 @@ namespace OpenSim.Region.Capabilities
42 private LLSDMethod<TRequest, TResponse> m_method; 40 private LLSDMethod<TRequest, TResponse> m_method;
43 41
44 public LLSDStreamhandler(string httpMethod, string path, LLSDMethod<TRequest, TResponse> method) 42 public LLSDStreamhandler(string httpMethod, string path, LLSDMethod<TRequest, TResponse> method)
45 : base(httpMethod, path ) 43 : base(httpMethod, path)
46 { 44 {
47 m_method = method; 45 m_method = method;
48 } 46 }
49 47
50 public override byte[] Handle(string path, Stream request) 48 public override byte[] Handle(string path, Stream request)
51 { 49 {
52 //Encoding encoding = Encoding.UTF8; 50 //Encoding encoding = Encoding.UTF8;
@@ -55,16 +53,15 @@ namespace OpenSim.Region.Capabilities
55 //string requestBody = streamReader.ReadToEnd(); 53 //string requestBody = streamReader.ReadToEnd();
56 //streamReader.Close(); 54 //streamReader.Close();
57 55
58 Hashtable hash = (Hashtable)LLSD.LLSDDeserialize( request ); 56 Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(request);
59 TRequest llsdRequest = new TRequest(); 57 TRequest llsdRequest = new TRequest();
60 LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest); 58 LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest);
61 59
62 TResponse response = m_method(llsdRequest); 60 TResponse response = m_method(llsdRequest);
63 61
64 Encoding encoding = new UTF8Encoding(false); 62 Encoding encoding = new UTF8Encoding(false);
65
66 return encoding.GetBytes( LLSDHelpers.SerialiseLLSDReply(response) );
67 63
64 return encoding.GetBytes(LLSDHelpers.SerialiseLLSDReply(response));
68 } 65 }
69 } 66 }
70} 67} \ No newline at end of file