aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/ClientView.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/ClientView.cs')
-rw-r--r--OpenSim/Region/ClientStack/ClientView.cs30
1 files changed, 14 insertions, 16 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs
index a36eeb0..606ca1d 100644
--- a/OpenSim/Region/ClientStack/ClientView.cs
+++ b/OpenSim/Region/ClientStack/ClientView.cs
@@ -25,24 +25,22 @@
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;
30using System.Collections.Generic; 28using System.Collections.Generic;
31using libsecondlife;
32using libsecondlife.Packets;
33using Nwc.XmlRpc;
34using System.Net; 29using System.Net;
35using System.Net.Sockets; 30using System.Text;
36using System.IO;
37using System.Threading; 31using System.Threading;
38using System.Timers; 32using System.Timers;
33using libsecondlife;
34using libsecondlife.Packets;
35using OpenSim.Assets;
39using OpenSim.Framework; 36using OpenSim.Framework;
37using OpenSim.Framework.Console;
40using OpenSim.Framework.Interfaces; 38using OpenSim.Framework.Interfaces;
41using OpenSim.Framework.Types;
42using OpenSim.Framework.Inventory; 39using OpenSim.Framework.Inventory;
40using OpenSim.Framework.Types;
43using OpenSim.Framework.Utilities; 41using OpenSim.Framework.Utilities;
44using OpenSim.Assets;
45using OpenSim.Region.Caches; 42using OpenSim.Region.Caches;
43using Timer=System.Timers.Timer;
46 44
47namespace OpenSim.Region.ClientStack 45namespace OpenSim.Region.ClientStack
48{ 46{
@@ -79,7 +77,7 @@ namespace OpenSim.Region.ClientStack
79 private int cachedtextureserial = 0; 77 private int cachedtextureserial = 0;
80 private RegionInfo m_regionData; 78 private RegionInfo m_regionData;
81 protected AuthenticateSessionsBase m_authenticateSessionsHandler; 79 protected AuthenticateSessionsBase m_authenticateSessionsHandler;
82 private System.Text.Encoding enc = System.Text.Encoding.ASCII; 80 private Encoding enc = Encoding.ASCII;
83 81
84 public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, ClientView> clientThreads, IWorld world, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AuthenticateSessionsBase authenSessions ) 82 public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, ClientView> clientThreads, IWorld world, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AuthenticateSessionsBase authenSessions )
85 { 83 {
@@ -91,7 +89,7 @@ namespace OpenSim.Region.ClientStack
91 m_inventoryCache = inventoryCache; 89 m_inventoryCache = inventoryCache;
92 m_authenticateSessionsHandler = authenSessions; 90 m_authenticateSessionsHandler = authenSessions;
93 91
94 OpenSim.Framework.Console.MainLog.Instance.Verbose( "OpenSimClient.cs - Started up new client thread to handle incoming request"); 92 MainLog.Instance.Verbose( "OpenSimClient.cs - Started up new client thread to handle incoming request");
95 cirpack = initialcirpack; 93 cirpack = initialcirpack;
96 userEP = remoteEP; 94 userEP = remoteEP;
97 95
@@ -100,7 +98,7 @@ namespace OpenSim.Region.ClientStack
100 PacketQueue = new BlockingQueue<QueItem>(); 98 PacketQueue = new BlockingQueue<QueItem>();
101 99
102 this.UploadAssets = new AgentAssetUpload(this, m_assetCache, m_inventoryCache); 100 this.UploadAssets = new AgentAssetUpload(this, m_assetCache, m_inventoryCache);
103 AckTimer = new System.Timers.Timer(500); 101 AckTimer = new Timer(500);
104 AckTimer.Elapsed += new ElapsedEventHandler(AckTimer_Elapsed); 102 AckTimer.Elapsed += new ElapsedEventHandler(AckTimer_Elapsed);
105 AckTimer.Start(); 103 AckTimer.Start();
106 104
@@ -189,7 +187,7 @@ namespace OpenSim.Region.ClientStack
189 187
190 protected virtual void ClientLoop() 188 protected virtual void ClientLoop()
191 { 189 {
192 OpenSim.Framework.Console.MainLog.Instance.Verbose( "OpenSimClient.cs:ClientLoop() - Entered loop"); 190 MainLog.Instance.Verbose( "OpenSimClient.cs:ClientLoop() - Entered loop");
193 while (true) 191 while (true)
194 { 192 {
195 QueItem nextPacket = PacketQueue.Dequeue(); 193 QueItem nextPacket = PacketQueue.Dequeue();
@@ -211,7 +209,7 @@ namespace OpenSim.Region.ClientStack
211 209
212 protected virtual void InitNewClient() 210 protected virtual void InitNewClient()
213 { 211 {
214 OpenSim.Framework.Console.MainLog.Instance.Verbose( "OpenSimClient.cs:InitNewClient() - Adding viewer agent to world"); 212 MainLog.Instance.Verbose( "OpenSimClient.cs:InitNewClient() - Adding viewer agent to world");
215 this.m_world.AddNewClient(this, false); 213 this.m_world.AddNewClient(this, false);
216 } 214 }
217 215
@@ -222,12 +220,12 @@ namespace OpenSim.Region.ClientStack
222 if (!sessionInfo.Authorised) 220 if (!sessionInfo.Authorised)
223 { 221 {
224 //session/circuit not authorised 222 //session/circuit not authorised
225 OpenSim.Framework.Console.MainLog.Instance.Notice("OpenSimClient.cs:AuthUser() - New user request denied to " + userEP.ToString()); 223 MainLog.Instance.Notice("OpenSimClient.cs:AuthUser() - New user request denied to " + userEP.ToString());
226 ClientThread.Abort(); 224 ClientThread.Abort();
227 } 225 }
228 else 226 else
229 { 227 {
230 OpenSim.Framework.Console.MainLog.Instance.Notice("OpenSimClient.cs:AuthUser() - Got authenticated connection from " + userEP.ToString()); 228 MainLog.Instance.Notice("OpenSimClient.cs:AuthUser() - Got authenticated connection from " + userEP.ToString());
231 //session is authorised 229 //session is authorised
232 this.AgentID = cirpack.CircuitCode.ID; 230 this.AgentID = cirpack.CircuitCode.ID;
233 this.SessionID = cirpack.CircuitCode.SessionID; 231 this.SessionID = cirpack.CircuitCode.SessionID;