aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Servers')
-rw-r--r--OpenSim/Framework/Servers/BaseHttpServer.cs19
-rw-r--r--OpenSim/Framework/Servers/CheckSumServer.cs15
-rw-r--r--OpenSim/Framework/Servers/ILlsdMethodHandler.cs30
-rw-r--r--OpenSim/Framework/Servers/LlsdMethod.cs30
-rw-r--r--OpenSim/Framework/Servers/RestMethod.cs4
-rw-r--r--OpenSim/Framework/Servers/UDPServerBase.cs8
-rw-r--r--OpenSim/Framework/Servers/XmlRpcMethod.cs1
7 files changed, 64 insertions, 43 deletions
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs
index 5dc1f56..713793c 100644
--- a/OpenSim/Framework/Servers/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/BaseHttpServer.cs
@@ -26,13 +26,14 @@
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections;
29using System.Collections.Generic; 30using System.Collections.Generic;
31using System.IO;
30using System.Net; 32using System.Net;
31using System.Text; 33using System.Text;
32using System.Text.RegularExpressions; 34using System.Text.RegularExpressions;
33using System.Threading; 35using System.Threading;
34using Nwc.XmlRpc; 36using Nwc.XmlRpc;
35using System.Collections;
36using OpenSim.Framework.Console; 37using OpenSim.Framework.Console;
37 38
38namespace OpenSim.Framework.Servers 39namespace OpenSim.Framework.Servers
@@ -199,9 +200,9 @@ namespace OpenSim.Framework.Servers
199 response.KeepAlive = false; 200 response.KeepAlive = false;
200 response.SendChunked = false; 201 response.SendChunked = false;
201 202
202 System.IO.Stream body = request.InputStream; 203 Stream body = request.InputStream;
203 System.Text.Encoding encoding = System.Text.Encoding.UTF8; 204 Encoding encoding = Encoding.UTF8;
204 System.IO.StreamReader reader = new System.IO.StreamReader(body, encoding); 205 StreamReader reader = new StreamReader(body, encoding);
205 206
206 string requestBody = reader.ReadToEnd(); 207 string requestBody = reader.ReadToEnd();
207 body.Close(); 208 body.Close();
@@ -245,8 +246,8 @@ namespace OpenSim.Framework.Servers
245 246
246 } 247 }
247 248
248 byte[] buffer = System.Text.Encoding.UTF8.GetBytes(responseString); 249 byte[] buffer = Encoding.UTF8.GetBytes(responseString);
249 System.IO.Stream output = response.OutputStream; 250 Stream output = response.OutputStream;
250 response.SendChunked = false; 251 response.SendChunked = false;
251 response.ContentLength64 = buffer.Length; 252 response.ContentLength64 = buffer.Length;
252 output.Write(buffer, 0, buffer.Length); 253 output.Write(buffer, 0, buffer.Length);
@@ -260,7 +261,7 @@ namespace OpenSim.Framework.Servers
260 261
261 public void Start() 262 public void Start()
262 { 263 {
263 OpenSim.Framework.Console.MainLog.Instance.WriteLine(LogPriority.LOW, "BaseHttpServer.cs: Starting up HTTP Server"); 264 MainLog.Instance.WriteLine(LogPriority.LOW, "BaseHttpServer.cs: Starting up HTTP Server");
264 265
265 m_workerThread = new Thread(new ThreadStart(StartHTTP)); 266 m_workerThread = new Thread(new ThreadStart(StartHTTP));
266 m_workerThread.IsBackground = true; 267 m_workerThread.IsBackground = true;
@@ -271,7 +272,7 @@ namespace OpenSim.Framework.Servers
271 { 272 {
272 try 273 try
273 { 274 {
274 OpenSim.Framework.Console.MainLog.Instance.WriteLine(LogPriority.LOW, "BaseHttpServer.cs: StartHTTP() - Spawned main thread OK"); 275 MainLog.Instance.WriteLine(LogPriority.LOW, "BaseHttpServer.cs: StartHTTP() - Spawned main thread OK");
275 m_httpListener = new HttpListener(); 276 m_httpListener = new HttpListener();
276 277
277 m_httpListener.Prefixes.Add("http://+:" + m_port + "/"); 278 m_httpListener.Prefixes.Add("http://+:" + m_port + "/");
@@ -286,7 +287,7 @@ namespace OpenSim.Framework.Servers
286 } 287 }
287 catch (Exception e) 288 catch (Exception e)
288 { 289 {
289 OpenSim.Framework.Console.MainLog.Instance.WriteLine(LogPriority.MEDIUM, e.Message); 290 MainLog.Instance.WriteLine(LogPriority.MEDIUM, e.Message);
290 } 291 }
291 } 292 }
292 293
diff --git a/OpenSim/Framework/Servers/CheckSumServer.cs b/OpenSim/Framework/Servers/CheckSumServer.cs
index 6aeb58c..104de94 100644
--- a/OpenSim/Framework/Servers/CheckSumServer.cs
+++ b/OpenSim/Framework/Servers/CheckSumServer.cs
@@ -25,21 +25,6 @@
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System;
29using System.Text;
30using System.IO;
31using System.Threading;
32using System.Net;
33using System.Net.Sockets;
34using System.Timers;
35using System.Reflection;
36using System.Collections;
37using System.Collections.Generic;
38using libsecondlife;
39using libsecondlife.Packets;
40using OpenSim.Framework.Console;
41
42
43namespace OpenSim.Framework.Servers 28namespace OpenSim.Framework.Servers
44{ 29{
45/* public class CheckSumServer : UDPServerBase 30/* public class CheckSumServer : UDPServerBase
diff --git a/OpenSim/Framework/Servers/ILlsdMethodHandler.cs b/OpenSim/Framework/Servers/ILlsdMethodHandler.cs
index f5daa8d..5382f2d 100644
--- a/OpenSim/Framework/Servers/ILlsdMethodHandler.cs
+++ b/OpenSim/Framework/Servers/ILlsdMethodHandler.cs
@@ -1,6 +1,30 @@
1using System; 1/*
2using System.Collections.Generic; 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3using System.Text; 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
4 28
5namespace OpenSim.Framework.Servers 29namespace OpenSim.Framework.Servers
6{ 30{
diff --git a/OpenSim/Framework/Servers/LlsdMethod.cs b/OpenSim/Framework/Servers/LlsdMethod.cs
index bf58a71..d17fa38 100644
--- a/OpenSim/Framework/Servers/LlsdMethod.cs
+++ b/OpenSim/Framework/Servers/LlsdMethod.cs
@@ -1,6 +1,30 @@
1using System; 1/*
2using System.Collections.Generic; 2* Copyright (c) Contributors, http://www.openmetaverse.org/
3using System.Text; 3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
4 28
5namespace OpenSim.Framework.Servers 29namespace OpenSim.Framework.Servers
6{ 30{
diff --git a/OpenSim/Framework/Servers/RestMethod.cs b/OpenSim/Framework/Servers/RestMethod.cs
index a2b6bf0..c6cb230 100644
--- a/OpenSim/Framework/Servers/RestMethod.cs
+++ b/OpenSim/Framework/Servers/RestMethod.cs
@@ -25,10 +25,6 @@
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenSim.Framework.Servers 28namespace OpenSim.Framework.Servers
33{ 29{
34 public delegate string RestMethod( string request, string path, string param ); 30 public delegate string RestMethod( string request, string path, string param );
diff --git a/OpenSim/Framework/Servers/UDPServerBase.cs b/OpenSim/Framework/Servers/UDPServerBase.cs
index 2617c56..508eb9d 100644
--- a/OpenSim/Framework/Servers/UDPServerBase.cs
+++ b/OpenSim/Framework/Servers/UDPServerBase.cs
@@ -26,16 +26,8 @@
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Text;
30using System.IO;
31using System.Threading;
32using System.Net; 29using System.Net;
33using System.Net.Sockets; 30using System.Net.Sockets;
34using System.Timers;
35using System.Reflection;
36using System.Collections;
37using System.Collections.Generic;
38using libsecondlife;
39using libsecondlife.Packets; 31using libsecondlife.Packets;
40 32
41namespace OpenSim.Framework.Servers 33namespace OpenSim.Framework.Servers
diff --git a/OpenSim/Framework/Servers/XmlRpcMethod.cs b/OpenSim/Framework/Servers/XmlRpcMethod.cs
index 51b3303..b76ac51 100644
--- a/OpenSim/Framework/Servers/XmlRpcMethod.cs
+++ b/OpenSim/Framework/Servers/XmlRpcMethod.cs
@@ -25,7 +25,6 @@
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System;
29using Nwc.XmlRpc; 28using Nwc.XmlRpc;
30 29
31namespace OpenSim.Framework.Servers 30namespace OpenSim.Framework.Servers