diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index 107bb6d1dd..1a3061985e 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs @@ -50,51 +50,117 @@ namespace OpenSim.Region.ClientStack /// public class ClientView : IClientAPI { + /* static variables */ public static TerrainManager TerrainManager; + /* private variables */ + private LLUUID m_sessionId; + private LLUUID m_secureSessionId = LLUUID.Zero; + private UseCircuitCodePacket cirpack; + //private AgentAssetUpload UploadAssets; + private LLUUID newAssetFolder = LLUUID.Zero; + private int debug = 0; + private ClientManager m_clientManager; + private AssetCache m_assetCache; + // private InventoryCache m_inventoryCache; + private int cachedtextureserial = 0; + private Timer clientPingTimer; + private int packetsReceived = 0; + private int probesWithNoIngressPackets = 0; + private int lastPacketsReceived = 0; + + private Encoding enc = Encoding.ASCII; + private LLUUID m_agentId; + private uint m_circuitCode; + private int m_moneyBalance; + + + private byte[] m_channelVersion=new byte[] { 0x00} ; // Dummy value needed by libSL + + /* protected variables */ protected static Dictionary PacketHandlers = new Dictionary(); //Global/static handlers for all clients - protected Dictionary m_packetHandlers = new Dictionary(); - //local handlers for this instance - private LLUUID m_sessionId; - - private LLUUID m_secureSessionId = LLUUID.Zero; + protected IScene m_scene; + protected AgentCircuitManager m_authenticateSessionsHandler; + + protected PacketQueue PacketQueue; + + protected Dictionary PendingAcks = new Dictionary(); + protected Dictionary NeedAck = new Dictionary(); + + protected Timer AckTimer; + protected uint Sequence = 0; + protected object SequenceLock = new object(); + protected const int MAX_APPENDED_ACKS = 10; + protected const int RESEND_TIMEOUT = 4000; + protected const int MAX_SEQUENCE = 0xFFFFFF; + protected PacketServer m_networkServer; + /* public variables */ + public string firstName; + public string lastName; + public Thread ClientThread; + public LLVector3 startpos; + public EndPoint userEP; + + + /* Properties */ public LLUUID SecureSessionId { get { return m_secureSessionId; } } - public string firstName; - public string lastName; - private UseCircuitCodePacket cirpack; - public Thread ClientThread; - public LLVector3 startpos; - - //private AgentAssetUpload UploadAssets; - private LLUUID newAssetFolder = LLUUID.Zero; - private int debug = 0; - - protected IScene m_scene; - public IScene Scene { get { return m_scene; } } - private ClientManager m_clientManager; - private AssetCache m_assetCache; - // private InventoryCache m_inventoryCache; - private int cachedtextureserial = 0; - protected AgentCircuitManager m_authenticateSessionsHandler; - private Encoding enc = Encoding.ASCII; - // Dead client detection vars - private Timer clientPingTimer; - private int packetsReceived = 0; - private int probesWithNoIngressPackets = 0; - private int lastPacketsReceived = 0; + public LLUUID SessionId + { + get { return m_sessionId; } + } + + public LLVector3 StartPos + { + get { return startpos; } + set { startpos = value; } + } + + public LLUUID AgentId + { + get { return m_agentId; } + } + + /// + /// + /// + public string FirstName + { + get { return firstName; } + } + + /// + /// + /// + public string LastName + { + get { return lastName; } + } + + public uint CircuitCode + { + get { return m_circuitCode; } + set { m_circuitCode = value; } + } + + public int MoneyBalance + { + get { return m_moneyBalance; } + } + + /* METHODS */ public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, ClientManager clientManager, IScene scene, AssetCache assetCache, PacketServer packServer, @@ -135,10 +201,6 @@ namespace OpenSim.Region.ClientStack ClientThread.Start(); } - public LLUUID SessionId - { - get { return m_sessionId; } - } public void SetDebug(int newDebug) { @@ -456,41 +518,6 @@ namespace OpenSim.Region.ClientStack public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; public event EstateOwnerMessageRequest OnEstateOwnerMessage; - /// - /// - /// - public LLVector3 StartPos - { - get { return startpos; } - set { startpos = value; } - } - - /// - /// - /// - private LLUUID m_agentId; - - public LLUUID AgentId - { - get { return m_agentId; } - } - - /// - /// - /// - public string FirstName - { - get { return firstName; } - } - - /// - /// - /// - public string LastName - { - get { return lastName; } - } - #region Scene/Avatar to Client /// @@ -534,7 +561,6 @@ namespace OpenSim.Region.ClientStack /// /// /// - private byte[] m_channelVersion=new byte[] { 0x00} ; // Dummy value needed by libSL public void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look) { AgentMovementCompletePacket mov = new AgentMovementCompletePacket(); @@ -2028,38 +2054,6 @@ namespace OpenSim.Region.ClientStack PacketQueue.SetThrottleFromClient(throttles); } // Previously ClientView.PacketQueue - protected PacketQueue PacketQueue; - - protected Queue IncomingPacketQueue; - protected Queue OutgoingPacketQueue; - protected Queue ResendOutgoingPacketQueue; - protected Queue LandOutgoingPacketQueue; - protected Queue WindOutgoingPacketQueue; - protected Queue CloudOutgoingPacketQueue; - protected Queue TaskOutgoingPacketQueue; - protected Queue TextureOutgoingPacketQueue; - protected Queue AssetOutgoingPacketQueue; - - protected Dictionary PendingAcks = new Dictionary(); - protected Dictionary NeedAck = new Dictionary(); - - protected Timer AckTimer; - protected uint Sequence = 0; - protected object SequenceLock = new object(); - protected const int MAX_APPENDED_ACKS = 10; - protected const int RESEND_TIMEOUT = 4000; - protected const int MAX_SEQUENCE = 0xFFFFFF; - - private uint m_circuitCode; - public EndPoint userEP; - - protected PacketServer m_networkServer; - - public uint CircuitCode - { - get { return m_circuitCode; } - set { m_circuitCode = value; } - } // A thread safe sequence number allocator. protected uint NextSeqNum() @@ -2317,12 +2311,6 @@ namespace OpenSim.Region.ClientStack #endregion // Previously ClientView.ProcessPackets - private int m_moneyBalance; - - public int MoneyBalance - { - get { return m_moneyBalance; } - } public bool AddMoney(int debit) {