diff options
author | Jeff Ames | 2008-03-04 04:11:37 +0000 |
---|---|---|
committer | Jeff Ames | 2008-03-04 04:11:37 +0000 |
commit | cd6f4a57e7586ffd5c6dae91633e61e293272def (patch) | |
tree | 880c9199b13ae75e428c878f5857f9cef886cf73 /OpenSim/Region/ScriptEngine | |
parent | think I finally fixed this hg sync issue (diff) | |
download | opensim-SC_OLD-cd6f4a57e7586ffd5c6dae91633e61e293272def.zip opensim-SC_OLD-cd6f4a57e7586ffd5c6dae91633e61e293272def.tar.gz opensim-SC_OLD-cd6f4a57e7586ffd5c6dae91633e61e293272def.tar.bz2 opensim-SC_OLD-cd6f4a57e7586ffd5c6dae91633e61e293272def.tar.xz |
Added copyright heaaders. Minor cleanup.
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
16 files changed, 41 insertions, 80 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/BuilIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/BuilIn_Commands.cs index 024ad2b..d13a76c 100644 --- a/OpenSim/Region/ScriptEngine/Common/BuilIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/BuilIn_Commands.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -36,7 +36,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
36 | /// <summary> | 36 | /// <summary> |
37 | /// This is the end of a chain of inherited builtin command implementations. This module will be instanced by script engines. | 37 | /// This is the end of a chain of inherited builtin command implementations. This module will be instanced by script engines. |
38 | /// </summary> | 38 | /// </summary> |
39 | public class BuilIn_Commands: OSSL_BuilIn_Commands | 39 | public class BuilIn_Commands : OSSL_BuilIn_Commands |
40 | { | 40 | { |
41 | public BuilIn_Commands(ScriptEngineBase.ScriptEngine scriptEngine, SceneObjectPart host, uint localID, | 41 | public BuilIn_Commands(ScriptEngineBase.ScriptEngine scriptEngine, SceneObjectPart host, uint localID, |
42 | LLUUID itemID) : base(scriptEngine, host, localID, itemID) | 42 | LLUUID itemID) : base(scriptEngine, host, localID, itemID) |
diff --git a/OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs b/OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs index 4fe4b71..30c40f4 100644 --- a/OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs +++ b/OpenSim/Region/ScriptEngine/Common/ExecutorBase.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -103,6 +103,5 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
103 | { | 103 | { |
104 | m_Running = false; | 104 | m_Running = false; |
105 | } | 105 | } |
106 | |||
107 | } | 106 | } |
108 | } | 107 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 32c6414..d516aa5 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
diff --git a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs index 27b3050..067b466 100644 --- a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -43,7 +43,6 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
43 | 43 | ||
44 | } | 44 | } |
45 | 45 | ||
46 | |||
47 | public OSSLPrim Prim; | 46 | public OSSLPrim Prim; |
48 | 47 | ||
49 | [Serializable] | 48 | [Serializable] |
@@ -57,7 +56,6 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
57 | Rotation = new OSSLPrim_Rotation(this); | 56 | Rotation = new OSSLPrim_Rotation(this); |
58 | } | 57 | } |
59 | 58 | ||
60 | |||
61 | public OSSLPrim_Position Position; | 59 | public OSSLPrim_Position Position; |
62 | public OSSLPrim_Rotation Rotation; | 60 | public OSSLPrim_Rotation Rotation; |
63 | //public LSL_Types.Vector3 Position | 61 | //public LSL_Types.Vector3 Position |
@@ -163,6 +161,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
163 | } | 161 | } |
164 | } | 162 | } |
165 | } | 163 | } |
164 | |||
166 | [Serializable] | 165 | [Serializable] |
167 | public class OSSLPrim_Rotation | 166 | public class OSSLPrim_Rotation |
168 | { | 167 | { |
@@ -245,7 +244,5 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
245 | // public double Z; | 244 | // public double Z; |
246 | // public double R; | 245 | // public double R; |
247 | //} | 246 | //} |
248 | |||
249 | |||
250 | } | 247 | } |
251 | } | 248 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs index 49164c1..6221abd 100644 --- a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs +++ b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs index 94c536f..1f837a1 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -49,7 +49,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin | |||
49 | m_CmdManager = CmdManager; | 49 | m_CmdManager = CmdManager; |
50 | } | 50 | } |
51 | 51 | ||
52 | |||
53 | public void CheckHttpRequests() | 52 | public void CheckHttpRequests() |
54 | { | 53 | { |
55 | if (m_CmdManager.m_ScriptEngine.World == null) | 54 | if (m_CmdManager.m_ScriptEngine.World == null) |
@@ -91,7 +90,5 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin | |||
91 | httpInfo = iHttpReq.GetNextCompletedRequest(); | 90 | httpInfo = iHttpReq.GetNextCompletedRequest(); |
92 | } | 91 | } |
93 | } | 92 | } |
94 | |||
95 | |||
96 | } | 93 | } |
97 | } | 94 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Listener.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Listener.cs index 194cb6b2..2fd2e91 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Listener.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Listener.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -36,7 +36,6 @@ using OpenSim.Region.Environment.Interfaces; | |||
36 | using OpenSim.Region.Environment.Modules; | 36 | using OpenSim.Region.Environment.Modules; |
37 | using OpenSim.Region.Environment.Scenes; | 37 | using OpenSim.Region.Environment.Scenes; |
38 | using OpenSim.Framework; | 38 | using OpenSim.Framework; |
39 | using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins; | ||
40 | 39 | ||
41 | namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins | 40 | namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins |
42 | { | 41 | { |
@@ -49,7 +48,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin | |||
49 | m_CmdManager = CmdManager; | 48 | m_CmdManager = CmdManager; |
50 | } | 49 | } |
51 | 50 | ||
52 | |||
53 | public void CheckListeners() | 51 | public void CheckListeners() |
54 | { | 52 | { |
55 | if (m_CmdManager.m_ScriptEngine.World == null) | 53 | if (m_CmdManager.m_ScriptEngine.World == null) |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs index bff85af..84e8313 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -36,7 +36,6 @@ using OpenSim.Region.Environment.Interfaces; | |||
36 | using OpenSim.Region.Environment.Modules; | 36 | using OpenSim.Region.Environment.Modules; |
37 | using OpenSim.Region.Environment.Scenes; | 37 | using OpenSim.Region.Environment.Scenes; |
38 | using OpenSim.Framework; | 38 | using OpenSim.Framework; |
39 | using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins; | ||
40 | 39 | ||
41 | namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins | 40 | namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins |
42 | { | 41 | { |
@@ -49,7 +48,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin | |||
49 | m_CmdManager = CmdManager; | 48 | m_CmdManager = CmdManager; |
50 | } | 49 | } |
51 | 50 | ||
52 | |||
53 | public Dictionary<uint, Dictionary<LLUUID, LSL_Types.list>> SenseEvents = | 51 | public Dictionary<uint, Dictionary<LLUUID, LSL_Types.list>> SenseEvents = |
54 | new Dictionary<uint, Dictionary<LLUUID, LSL_Types.list>>(); | 52 | new Dictionary<uint, Dictionary<LLUUID, LSL_Types.list>>(); |
55 | private Object SenseLock = new Object(); | 53 | private Object SenseLock = new Object(); |
@@ -183,7 +181,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin | |||
183 | return SenseList; | 181 | return SenseList; |
184 | } | 182 | } |
185 | } | 183 | } |
186 | |||
187 | } | 184 | } |
188 | 185 | ||
189 | private void SensorSweep(SenseRepeatClass ts) | 186 | private void SensorSweep(SenseRepeatClass ts) |
@@ -261,7 +258,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin | |||
261 | if (ang_obj > ts.arc) keep = false; | 258 | if (ang_obj > ts.arc) keep = false; |
262 | } | 259 | } |
263 | 260 | ||
264 | |||
265 | if (keep && (ts.keyID != null) && (ts.keyID != LLUUID.Zero) && (ts.keyID != ent.UUID)) | 261 | if (keep && (ts.keyID != null) && (ts.keyID != LLUUID.Zero) && (ts.keyID != ent.UUID)) |
266 | { | 262 | { |
267 | keep = false; | 263 | keep = false; |
@@ -286,13 +282,10 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin | |||
286 | objectname = SOP.Name; | 282 | objectname = SOP.Name; |
287 | } | 283 | } |
288 | 284 | ||
289 | |||
290 | if ((ts.name != entname) && (ts.name != avatarname) && (ts.name != objectname)) | 285 | if ((ts.name != entname) && (ts.name != avatarname) && (ts.name != objectname)) |
291 | { | 286 | { |
292 | keep = false; | 287 | keep = false; |
293 | } | 288 | } |
294 | |||
295 | |||
296 | } | 289 | } |
297 | 290 | ||
298 | if (keep == true) SensedObjects.Add(ent.UUID); | 291 | if (keep == true) SensedObjects.Add(ent.UUID); |
@@ -326,7 +319,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin | |||
326 | } | 319 | } |
327 | else | 320 | else |
328 | { | 321 | { |
329 | |||
330 | m_CmdManager.m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(ts.localID, ts.itemID, "sensor", EventQueueManager.llDetectNull, | 322 | m_CmdManager.m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(ts.localID, ts.itemID, "sensor", EventQueueManager.llDetectNull, |
331 | new object[] { SensedObjects.Length }); | 323 | new object[] { SensedObjects.Length }); |
332 | } | 324 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs index 02ef1a2..0ee5ee8 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -36,7 +36,6 @@ using OpenSim.Region.Environment.Interfaces; | |||
36 | using OpenSim.Region.Environment.Modules; | 36 | using OpenSim.Region.Environment.Modules; |
37 | using OpenSim.Region.Environment.Scenes; | 37 | using OpenSim.Region.Environment.Scenes; |
38 | using OpenSim.Framework; | 38 | using OpenSim.Framework; |
39 | using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins; | ||
40 | 39 | ||
41 | namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins | 40 | namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins |
42 | { | 41 | { |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs index 15af51f..5d6d6ad 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -36,7 +36,6 @@ using OpenSim.Region.Environment.Interfaces; | |||
36 | using OpenSim.Region.Environment.Modules; | 36 | using OpenSim.Region.Environment.Modules; |
37 | using OpenSim.Region.Environment.Scenes; | 37 | using OpenSim.Region.Environment.Scenes; |
38 | using OpenSim.Framework; | 38 | using OpenSim.Framework; |
39 | using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins; | ||
40 | 39 | ||
41 | namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins | 40 | namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins |
42 | { | 41 | { |
@@ -105,7 +104,5 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin | |||
105 | } | 104 | } |
106 | } | 105 | } |
107 | } | 106 | } |
108 | |||
109 | |||
110 | } | 107 | } |
111 | } | 108 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs b/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs index 26e479c..b79ff05 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPClient.cs b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPClient.cs index 1fd7a25..236b685 100644 --- a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPClient.cs +++ b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPClient.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -37,21 +37,19 @@ namespace OpenSim.Region.ScriptEngine.Common.TRPC | |||
37 | { | 37 | { |
38 | public class TCPClient : TCPCommon.ClientInterface | 38 | public class TCPClient : TCPCommon.ClientInterface |
39 | { | 39 | { |
40 | |||
41 | public TCPClient() | 40 | public TCPClient() |
42 | { | 41 | { |
43 | } | 42 | } |
43 | |||
44 | private readonly Dictionary<int, TCPSocket> Clients = new Dictionary<int, TCPSocket>(); | 44 | private readonly Dictionary<int, TCPSocket> Clients = new Dictionary<int, TCPSocket>(); |
45 | private int ClientCount = 0; | 45 | private int ClientCount = 0; |
46 | 46 | ||
47 | |||
48 | public event TCPCommon.ClientConnectedDelegate ClientConnected; | 47 | public event TCPCommon.ClientConnectedDelegate ClientConnected; |
49 | public event TCPCommon.DataReceivedDelegate DataReceived; | 48 | public event TCPCommon.DataReceivedDelegate DataReceived; |
50 | public event TCPCommon.DataSentDelegate DataSent; | 49 | public event TCPCommon.DataSentDelegate DataSent; |
51 | public event TCPCommon.CloseDelegate Close; | 50 | public event TCPCommon.CloseDelegate Close; |
52 | public event TCPCommon.ConnectErrorDelegate ConnectError; | 51 | public event TCPCommon.ConnectErrorDelegate ConnectError; |
53 | 52 | ||
54 | |||
55 | /// <summary> | 53 | /// <summary> |
56 | /// Creates client connection | 54 | /// Creates client connection |
57 | /// </summary> | 55 | /// </summary> |
@@ -62,6 +60,7 @@ namespace OpenSim.Region.ScriptEngine.Common.TRPC | |||
62 | //newsock.BeginConnect(ipe, new AsyncCallback(asyncConnected), newsock); | 60 | //newsock.BeginConnect(ipe, new AsyncCallback(asyncConnected), newsock); |
63 | newsock.Connect(ipe); | 61 | newsock.Connect(ipe); |
64 | } | 62 | } |
63 | |||
65 | public int ConnectAndReturnID(string RemoteHost, int RemotePort) | 64 | public int ConnectAndReturnID(string RemoteHost, int RemotePort) |
66 | { | 65 | { |
67 | Socket newsock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); | 66 | Socket newsock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); |
@@ -71,7 +70,6 @@ namespace OpenSim.Region.ScriptEngine.Common.TRPC | |||
71 | return ProcessConnection(newsock); | 70 | return ProcessConnection(newsock); |
72 | } | 71 | } |
73 | 72 | ||
74 | |||
75 | public void Disconnect(int ID) | 73 | public void Disconnect(int ID) |
76 | { | 74 | { |
77 | Clients[ID].Disconnect(); | 75 | Clients[ID].Disconnect(); |
@@ -88,9 +86,6 @@ namespace OpenSim.Region.ScriptEngine.Common.TRPC | |||
88 | { | 86 | { |
89 | try | 87 | try |
90 | { | 88 | { |
91 | |||
92 | |||
93 | |||
94 | int id = ClientCount++; | 89 | int id = ClientCount++; |
95 | TCPSocket S = new TCPSocket(id, client); | 90 | TCPSocket S = new TCPSocket(id, client); |
96 | 91 | ||
@@ -121,9 +116,6 @@ namespace OpenSim.Region.ScriptEngine.Common.TRPC | |||
121 | return -1; | 116 | return -1; |
122 | } | 117 | } |
123 | 118 | ||
124 | |||
125 | |||
126 | |||
127 | void S_DataSent(int ID, int length) | 119 | void S_DataSent(int ID, int length) |
128 | { | 120 | { |
129 | if (DataSent != null) | 121 | if (DataSent != null) |
@@ -147,7 +139,5 @@ namespace OpenSim.Region.ScriptEngine.Common.TRPC | |||
147 | { | 139 | { |
148 | Clients[clientID].Send(clientID, data, offset, len); | 140 | Clients[clientID].Send(clientID, data, offset, len); |
149 | } | 141 | } |
150 | |||
151 | |||
152 | } | 142 | } |
153 | } \ No newline at end of file | 143 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPCommon.cs b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPCommon.cs index f3a55ba..c0e402a 100644 --- a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPCommon.cs +++ b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPCommon.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -36,7 +36,6 @@ namespace OpenSim.Region.ScriptEngine.Common.TRPC | |||
36 | public delegate void CloseDelegate(int ID); | 36 | public delegate void CloseDelegate(int ID); |
37 | public delegate void ConnectErrorDelegate(string Reason); | 37 | public delegate void ConnectErrorDelegate(string Reason); |
38 | 38 | ||
39 | |||
40 | public interface ServerAndClientInterface | 39 | public interface ServerAndClientInterface |
41 | { | 40 | { |
42 | void Send(int clientID, byte[] data, int offset, int len); | 41 | void Send(int clientID, byte[] data, int offset, int len); |
@@ -45,17 +44,18 @@ namespace OpenSim.Region.ScriptEngine.Common.TRPC | |||
45 | event DataSentDelegate DataSent; | 44 | event DataSentDelegate DataSent; |
46 | event CloseDelegate Close; | 45 | event CloseDelegate Close; |
47 | } | 46 | } |
47 | |||
48 | public interface ClientInterface : ServerAndClientInterface | 48 | public interface ClientInterface : ServerAndClientInterface |
49 | { | 49 | { |
50 | event TCPCommon.ConnectErrorDelegate ConnectError; | 50 | event TCPCommon.ConnectErrorDelegate ConnectError; |
51 | void Connect(string RemoteHost, int RemotePort); | 51 | void Connect(string RemoteHost, int RemotePort); |
52 | void Disconnect(int ID); | 52 | void Disconnect(int ID); |
53 | } | 53 | } |
54 | |||
54 | public interface ServerInterface : ServerAndClientInterface | 55 | public interface ServerInterface : ServerAndClientInterface |
55 | { | 56 | { |
56 | void StartListen(); | 57 | void StartListen(); |
57 | void StopListen(); | 58 | void StopListen(); |
58 | } | 59 | } |
59 | |||
60 | } | 60 | } |
61 | } \ No newline at end of file | 61 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPServer.cs b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPServer.cs index da16da8..b1e6a82 100644 --- a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPServer.cs +++ b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPServer.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -68,7 +68,6 @@ namespace OpenSim.Region.ScriptEngine.Common.TRPC | |||
68 | private readonly Dictionary<int, TCPSocket> Clients = new Dictionary<int, TCPSocket>(); | 68 | private readonly Dictionary<int, TCPSocket> Clients = new Dictionary<int, TCPSocket>(); |
69 | private int ClientCount = 0; | 69 | private int ClientCount = 0; |
70 | 70 | ||
71 | |||
72 | public event TCPCommon.ClientConnectedDelegate ClientConnected; | 71 | public event TCPCommon.ClientConnectedDelegate ClientConnected; |
73 | public event TCPCommon.DataReceivedDelegate DataReceived; | 72 | public event TCPCommon.DataReceivedDelegate DataReceived; |
74 | public event TCPCommon.DataSentDelegate DataSent; | 73 | public event TCPCommon.DataSentDelegate DataSent; |
@@ -127,8 +126,5 @@ namespace OpenSim.Region.ScriptEngine.Common.TRPC | |||
127 | { | 126 | { |
128 | Clients[clientID].Send(clientID, data, offset, len); | 127 | Clients[clientID].Send(clientID, data, offset, len); |
129 | } | 128 | } |
130 | |||
131 | |||
132 | |||
133 | } | 129 | } |
134 | } \ No newline at end of file | 130 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPSocket.cs b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPSocket.cs index 1e47439..a14f245 100644 --- a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPSocket.cs +++ b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPSocket.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -33,7 +33,6 @@ namespace OpenSim.Region.ScriptEngine.Common.TRPC | |||
33 | { | 33 | { |
34 | public class TCPSocket | 34 | public class TCPSocket |
35 | { | 35 | { |
36 | |||
37 | public readonly Socket Client; | 36 | public readonly Socket Client; |
38 | public readonly int ID; | 37 | public readonly int ID; |
39 | 38 | ||
@@ -52,6 +51,7 @@ namespace OpenSim.Region.ScriptEngine.Common.TRPC | |||
52 | ID = id; | 51 | ID = id; |
53 | Client = client; | 52 | Client = client; |
54 | } | 53 | } |
54 | |||
55 | public void Start() | 55 | public void Start() |
56 | { | 56 | { |
57 | // Start listening | 57 | // Start listening |
@@ -85,10 +85,8 @@ namespace OpenSim.Region.ScriptEngine.Common.TRPC | |||
85 | 85 | ||
86 | // Start new receive | 86 | // Start new receive |
87 | BeginReceive(); | 87 | BeginReceive(); |
88 | |||
89 | } | 88 | } |
90 | 89 | ||
91 | |||
92 | public void Send(int clientID, byte[] data, int offset, int len) | 90 | public void Send(int clientID, byte[] data, int offset, int len) |
93 | { | 91 | { |
94 | Client.BeginSend(data, offset, len, SocketFlags.None, new AsyncCallback(asyncDataSent), Client); | 92 | Client.BeginSend(data, offset, len, SocketFlags.None, new AsyncCallback(asyncDataSent), Client); |
@@ -111,4 +109,4 @@ namespace OpenSim.Region.ScriptEngine.Common.TRPC | |||
111 | Close(ID); | 109 | Close(ID); |
112 | } | 110 | } |
113 | } | 111 | } |
114 | } \ No newline at end of file | 112 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs b/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs index 5752e2b..40a910d 100644 --- a/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs +++ b/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -44,19 +44,19 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
44 | public event ReceiveCommandDelegate ReceiveCommand; | 44 | public event ReceiveCommandDelegate ReceiveCommand; |
45 | System.Collections.Generic.Dictionary<string, Type> TypeDictionary = new Dictionary<string, Type>(); | 45 | System.Collections.Generic.Dictionary<string, Type> TypeDictionary = new Dictionary<string, Type>(); |
46 | Type[] Types = | 46 | Type[] Types = |
47 | { | 47 | { |
48 | typeof(System.String), | 48 | typeof(System.String), |
49 | typeof(System.Int16), | 49 | typeof(System.Int16), |
50 | typeof(System.Int32), | 50 | typeof(System.Int32), |
51 | typeof(System.Int64), | 51 | typeof(System.Int64), |
52 | typeof(System.Double), | 52 | typeof(System.Double), |
53 | typeof(System.Decimal), | 53 | typeof(System.Decimal), |
54 | typeof(System.Array), | 54 | typeof(System.Array), |
55 | typeof(LLUUID), | 55 | typeof(LLUUID), |
56 | typeof(System.UInt16), | 56 | typeof(System.UInt16), |
57 | typeof(System.UInt32), | 57 | typeof(System.UInt32), |
58 | typeof(System.UInt64) | 58 | typeof(System.UInt64) |
59 | }; | 59 | }; |
60 | 60 | ||
61 | // TODO: Maybe we should move queue into TCPSocket so we won't have to keep one queue instance per connection | 61 | // TODO: Maybe we should move queue into TCPSocket so we won't have to keep one queue instance per connection |
62 | private System.Collections.Generic.Dictionary<int, InQueueStruct> InQueue = new Dictionary<int, InQueueStruct>(); | 62 | private System.Collections.Generic.Dictionary<int, InQueueStruct> InQueue = new Dictionary<int, InQueueStruct>(); |
@@ -112,7 +112,6 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
112 | 112 | ||
113 | private void ProcessQueue(int ID) | 113 | private void ProcessQueue(int ID) |
114 | { | 114 | { |
115 | |||
116 | // This is just a temp implementation -- not so fast :) | 115 | // This is just a temp implementation -- not so fast :) |
117 | 116 | ||
118 | InQueueStruct myIQS = InQueue[ID]; | 117 | InQueueStruct myIQS = InQueue[ID]; |
@@ -122,7 +121,6 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
122 | string receivedData = Encoding.ASCII.GetString(myIQS.Queue, 0, myIQS.QueueSize); | 121 | string receivedData = Encoding.ASCII.GetString(myIQS.Queue, 0, myIQS.QueueSize); |
123 | Debug.WriteLine("RAW: " + receivedData); | 122 | Debug.WriteLine("RAW: " + receivedData); |
124 | 123 | ||
125 | |||
126 | byte newLine = 10; | 124 | byte newLine = 10; |
127 | while (true) | 125 | while (true) |
128 | { | 126 | { |
@@ -202,4 +200,4 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
202 | TCPS.Send(ID, byteData, 0, byteData.Length); | 200 | TCPS.Send(ID, byteData, 0, byteData.Length); |
203 | } | 201 | } |
204 | } | 202 | } |
205 | } \ No newline at end of file | 203 | } |