aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Client/MXP/PacketHandler
diff options
context:
space:
mode:
authorAdam Frisby2009-02-22 12:45:23 +0000
committerAdam Frisby2009-02-22 12:45:23 +0000
commit648f55ed11eb11161a2c5939c0f4d6d7d61eaabd (patch)
tree546274ffc172440dea98aa78d60777f5965033c8 /OpenSim/Client/MXP/PacketHandler
parent* Fixes an assumption whereby Scene assumes that each client is capable of pr... (diff)
downloadopensim-SC_OLD-648f55ed11eb11161a2c5939c0f4d6d7d61eaabd.zip
opensim-SC_OLD-648f55ed11eb11161a2c5939c0f4d6d7d61eaabd.tar.gz
opensim-SC_OLD-648f55ed11eb11161a2c5939c0f4d6d7d61eaabd.tar.bz2
opensim-SC_OLD-648f55ed11eb11161a2c5939c0f4d6d7d61eaabd.tar.xz
* MXP Clients are now treated as full root agents - including being given a default avatar.
* MXP Clients now are capable of displaying primitives and objects within the Scene.
Diffstat (limited to 'OpenSim/Client/MXP/PacketHandler')
-rw-r--r--OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs30
1 files changed, 29 insertions, 1 deletions
diff --git a/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs b/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs
index 2634717..1e343c4 100644
--- a/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs
+++ b/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs
@@ -4,11 +4,13 @@
4using System; 4using System;
5using System.Collections.Generic; 5using System.Collections.Generic;
6using System.Reflection; 6using System.Reflection;
7using System.Threading;
7using log4net; 8using log4net;
8using MXP; 9using MXP;
9using MXP.Messages; 10using MXP.Messages;
10using OpenMetaverse; 11using OpenMetaverse;
11using OpenSim.Client.MXP.ClientStack; 12using OpenSim.Client.MXP.ClientStack;
13using OpenSim.Framework;
12using OpenSim.Region.Framework.Scenes; 14using OpenSim.Region.Framework.Scenes;
13 15
14namespace OpenSim.Client.MXP.PacketHandler 16namespace OpenSim.Client.MXP.PacketHandler
@@ -24,6 +26,8 @@ namespace OpenSim.Client.MXP.PacketHandler
24 26
25 private readonly Transmitter transmitter; 27 private readonly Transmitter transmitter;
26 28
29 private readonly Thread m_clientThread;
30
27 private readonly IList<Session> sessions = new List<Session>(); 31 private readonly IList<Session> sessions = new List<Session>();
28 private readonly IList<Session> sessionsToClient = new List<Session>(); 32 private readonly IList<Session> sessionsToClient = new List<Session>();
29 private readonly IList<MXPClientView> sessionsToRemove = new List<MXPClientView>(); 33 private readonly IList<MXPClientView> sessionsToRemove = new List<MXPClientView>();
@@ -48,6 +52,16 @@ namespace OpenSim.Client.MXP.PacketHandler
48 programName = "OpenSimulator"; 52 programName = "OpenSimulator";
49 53
50 transmitter = new Transmitter(port); 54 transmitter = new Transmitter(port);
55
56 m_clientThread = new Thread(StartListener);
57 m_clientThread.Name = "MXPThread";
58 m_clientThread.IsBackground = true;
59 m_clientThread.Start();
60 ThreadTracker.Add(m_clientThread);
61 }
62
63 public void StartListener()
64 {
51 transmitter.Startup(); 65 transmitter.Startup();
52 } 66 }
53 67
@@ -255,9 +269,23 @@ namespace OpenSim.Client.MXP.PacketHandler
255 269
256 MXPClientView client = new MXPClientView(session, mxpSessionID, target, 270 MXPClientView client = new MXPClientView(session, mxpSessionID, target,
257 joinRequestMessage.ParticipantName); 271 joinRequestMessage.ParticipantName);
272 m_log.Info("[MXP ClientStack] Created Client");
258 Clients.Add(client); 273 Clients.Add(client);
259 274
260 target.AddNewClient(client); 275 m_log.Info("[MXP ClientStack] Adding to Scene");
276 target.ClientManager.Add(client.CircuitCode, client);
277
278 m_log.Info("[MXP ClientStack] Initialising...");
279 try
280 {
281 client.Start();
282 } catch( Exception e)
283 {
284 m_log.Info(e);
285 }
286
287 m_log.Info("[MXP ClientStack] Connected");
288 //target.EventManager.TriggerOnNewClient(client);
261 } 289 }
262 else 290 else
263 { 291 {