diff options
Diffstat (limited to '')
5 files changed, 21 insertions, 24 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC/MyBase.cs b/OpenSim/Region/ScriptEngine/Common/TRPC/MyBase.cs index 6fe6381..14c6078 100644 --- a/OpenSim/Region/ScriptEngine/Common/TRPC/MyBase.cs +++ b/OpenSim/Region/ScriptEngine/Common/TRPC/MyBase.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 | ||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Text; | ||
31 | |||
32 | namespace OpenSim.Region.ScriptEngine.Common.TRPC | 28 | namespace OpenSim.Region.ScriptEngine.Common.TRPC |
33 | { | 29 | { |
34 | class MyBase | 30 | class MyBase |
diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPClient.cs b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPClient.cs index 7689d69..624c3bb 100644 --- a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPClient.cs +++ b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPClient.cs | |||
@@ -25,12 +25,10 @@ | |||
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 | ||
28 | using System; | ||
29 | using System.Collections.Generic; | 28 | using System.Collections.Generic; |
30 | using System.Diagnostics; | 29 | using System.Diagnostics; |
31 | using System.Net; | 30 | using System.Net; |
32 | using System.Net.Sockets; | 31 | using System.Net.Sockets; |
33 | using System.Text; | ||
34 | 32 | ||
35 | namespace OpenSim.Region.ScriptEngine.Common.TRPC | 33 | namespace OpenSim.Region.ScriptEngine.Common.TRPC |
36 | { | 34 | { |
diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPCommon.cs b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPCommon.cs index 521d75b..ab9d9b4 100644 --- a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPCommon.cs +++ b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPCommon.cs | |||
@@ -25,11 +25,13 @@ | |||
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 | ||
28 | using System.Net; | ||
29 | |||
28 | namespace OpenSim.Region.ScriptEngine.Common.TRPC | 30 | namespace OpenSim.Region.ScriptEngine.Common.TRPC |
29 | { | 31 | { |
30 | public class TCPCommon | 32 | public class TCPCommon |
31 | { | 33 | { |
32 | public delegate void ClientConnectedDelegate(int ID, System.Net.EndPoint Remote); | 34 | public delegate void ClientConnectedDelegate(int ID, EndPoint Remote); |
33 | public delegate void DataReceivedDelegate(int ID, byte[] data, int offset, int length); | 35 | public delegate void DataReceivedDelegate(int ID, byte[] data, int offset, int length); |
34 | public delegate void DataSentDelegate(int ID, int length); | 36 | public delegate void DataSentDelegate(int ID, int length); |
35 | public delegate void CloseDelegate(int ID); | 37 | public delegate void CloseDelegate(int ID); |
@@ -46,7 +48,7 @@ namespace OpenSim.Region.ScriptEngine.Common.TRPC | |||
46 | 48 | ||
47 | public interface ClientInterface : ServerAndClientInterface | 49 | public interface ClientInterface : ServerAndClientInterface |
48 | { | 50 | { |
49 | event TCPCommon.ConnectErrorDelegate ConnectError; | 51 | event ConnectErrorDelegate ConnectError; |
50 | void Connect(string RemoteHost, int RemotePort); | 52 | void Connect(string RemoteHost, int RemotePort); |
51 | void Disconnect(int ID); | 53 | void Disconnect(int ID); |
52 | } | 54 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPServer.cs b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPServer.cs index 5d1e53a..55a20e7 100644 --- a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPServer.cs +++ b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPServer.cs | |||
@@ -30,7 +30,6 @@ using System.Collections.Generic; | |||
30 | using System.Diagnostics; | 30 | using System.Diagnostics; |
31 | using System.Net; | 31 | using System.Net; |
32 | using System.Net.Sockets; | 32 | using System.Net.Sockets; |
33 | using TCPCommon=OpenSim.Region.ScriptEngine.Common.TRPC.TCPCommon; | ||
34 | 33 | ||
35 | namespace OpenSim.Region.ScriptEngine.Common.TRPC | 34 | namespace OpenSim.Region.ScriptEngine.Common.TRPC |
36 | { | 35 | { |
diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs b/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs index 4567e60..013ae0f 100644 --- a/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs +++ b/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs | |||
@@ -28,7 +28,9 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Diagnostics; | 30 | using System.Diagnostics; |
31 | using System.Net; | ||
31 | using System.Text; | 32 | using System.Text; |
33 | using System.Web; | ||
32 | using libsecondlife; | 34 | using libsecondlife; |
33 | using OpenSim.Region.ScriptEngine.Common.TRPC; | 35 | using OpenSim.Region.ScriptEngine.Common.TRPC; |
34 | 36 | ||
@@ -41,24 +43,24 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
41 | 43 | ||
42 | public delegate void ReceiveCommandDelegate(int ID, string Command, params object[] p); | 44 | public delegate void ReceiveCommandDelegate(int ID, string Command, params object[] p); |
43 | public event ReceiveCommandDelegate ReceiveCommand; | 45 | public event ReceiveCommandDelegate ReceiveCommand; |
44 | System.Collections.Generic.Dictionary<string, Type> TypeDictionary = new Dictionary<string, Type>(); | 46 | Dictionary<string, Type> TypeDictionary = new Dictionary<string, Type>(); |
45 | Type[] Types = | 47 | Type[] Types = |
46 | { | 48 | { |
47 | typeof(System.String), | 49 | typeof(String), |
48 | typeof(System.Int16), | 50 | typeof(Int16), |
49 | typeof(System.Int32), | 51 | typeof(Int32), |
50 | typeof(System.Int64), | 52 | typeof(Int64), |
51 | typeof(System.Double), | 53 | typeof(Double), |
52 | typeof(System.Decimal), | 54 | typeof(Decimal), |
53 | typeof(System.Array), | 55 | typeof(Array), |
54 | typeof(LLUUID), | 56 | typeof(LLUUID), |
55 | typeof(System.UInt16), | 57 | typeof(UInt16), |
56 | typeof(System.UInt32), | 58 | typeof(UInt32), |
57 | typeof(System.UInt64) | 59 | typeof(UInt64) |
58 | }; | 60 | }; |
59 | 61 | ||
60 | // TODO: Maybe we should move queue into TCPSocket so we won't have to keep one queue instance per connection | 62 | // TODO: Maybe we should move queue into TCPSocket so we won't have to keep one queue instance per connection |
61 | private System.Collections.Generic.Dictionary<int, InQueueStruct> InQueue = new Dictionary<int, InQueueStruct>(); | 63 | private Dictionary<int, InQueueStruct> InQueue = new Dictionary<int, InQueueStruct>(); |
62 | private class InQueueStruct | 64 | private class InQueueStruct |
63 | { | 65 | { |
64 | public byte[] Queue; | 66 | public byte[] Queue; |
@@ -81,7 +83,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
81 | } | 83 | } |
82 | } | 84 | } |
83 | 85 | ||
84 | void TCPS_ClientConnected(int ID, System.Net.EndPoint Remote) | 86 | void TCPS_ClientConnected(int ID, EndPoint Remote) |
85 | { | 87 | { |
86 | // Create a incoming queue for this connection | 88 | // Create a incoming queue for this connection |
87 | InQueueStruct iq = new InQueueStruct(); | 89 | InQueueStruct iq = new InQueueStruct(); |
@@ -165,7 +167,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
165 | for (int i = 1; i < parts.Length; i++) | 167 | for (int i = 1; i < parts.Length; i++) |
166 | { | 168 | { |
167 | string[] spl; | 169 | string[] spl; |
168 | spl = System.Web.HttpUtility.UrlDecode(parts[i]).Split('|'); | 170 | spl = HttpUtility.UrlDecode(parts[i]).Split('|'); |
169 | string t = spl[0]; | 171 | string t = spl[0]; |
170 | param[i - 1] = Convert.ChangeType(spl[1], TypeLookup(t)); | 172 | param[i - 1] = Convert.ChangeType(spl[1], TypeLookup(t)); |
171 | } | 173 | } |
@@ -192,7 +194,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
192 | string tmpStr = Command; | 194 | string tmpStr = Command; |
193 | for (int i = 0; i < p.Length; i++) | 195 | for (int i = 0; i < p.Length; i++) |
194 | { | 196 | { |
195 | tmpStr += "," + p[i].GetType().ToString() + "|" + System.Web.HttpUtility.UrlEncode(p[i].ToString()); // .Replace(",", "%44") | 197 | tmpStr += "," + p[i].GetType().ToString() + "|" + HttpUtility.UrlEncode(p[i].ToString()); // .Replace(",", "%44") |
196 | } | 198 | } |
197 | tmpStr += "\n"; | 199 | tmpStr += "\n"; |
198 | byte[] byteData = Encoding.ASCII.GetBytes(tmpStr); | 200 | byte[] byteData = Encoding.ASCII.GetBytes(tmpStr); |