* Optimized usings (the 'LL ate my scripts' commit)

* added some licensing info
This commit is contained in:
lbsa71
2007-07-03 14:37:29 +00:00
parent 73a5ec391a
commit 9b6b6d05d4
184 changed files with 705 additions and 1207 deletions

View File

@@ -28,13 +28,12 @@
using System;
using System.Collections.Generic;
using System.Text;
using libsecondlife;
using OpenSim;
using libsecondlife.Packets;
//using OpenSim.GridServers;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Inventory;
using OpenSim.Framework.Types;
using OpenSim.Framework.Interfaces;
using OpenSim.Region.ClientStack;
namespace OpenSim.Assets
@@ -46,7 +45,7 @@ namespace OpenSim.Assets
{
private Dictionary<LLUUID, AgentInventory> _agentsInventory;
private List<UserServerRequest> _serverRequests; //list of requests made to user server.
private System.Text.Encoding _enc = System.Text.Encoding.ASCII;
private Encoding _enc = Encoding.ASCII;
private const uint FULL_MASK_PERMISSIONS = 2147483647;
public InventoryCache()
@@ -127,7 +126,7 @@ namespace OpenSim.Assets
return res;
}
public LLUUID AddNewInventoryItem(ClientView remoteClient, LLUUID folderID, OpenSim.Framework.Types.AssetBase asset)
public LLUUID AddNewInventoryItem(ClientView remoteClient, LLUUID folderID, AssetBase asset)
{
LLUUID newItem = null;
if (this._agentsInventory.ContainsKey(remoteClient.AgentID))
@@ -163,7 +162,7 @@ namespace OpenSim.Assets
return res;
}
public bool UpdateInventoryItemAsset(ClientView remoteClient, LLUUID itemID, OpenSim.Framework.Types.AssetBase asset)
public bool UpdateInventoryItemAsset(ClientView remoteClient, LLUUID itemID, AssetBase asset)
{
if (this._agentsInventory.ContainsKey(remoteClient.AgentID))
{
@@ -238,7 +237,7 @@ namespace OpenSim.Assets
Descend.ItemData[i].SalePrice = 100;
Descend.ItemData[i].SaleType = 0;
Descend.ItemData[i].Type = Item.Type;
Descend.ItemData[i].CRC = libsecondlife.Helpers.InventoryCRC(1000, 0, Descend.ItemData[i].InvType, Descend.ItemData[i].Type, Descend.ItemData[i].AssetID, Descend.ItemData[i].GroupID, 100, Descend.ItemData[i].OwnerID, Descend.ItemData[i].CreatorID, Descend.ItemData[i].ItemID, Descend.ItemData[i].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS);
Descend.ItemData[i].CRC = Helpers.InventoryCRC(1000, 0, Descend.ItemData[i].InvType, Descend.ItemData[i].Type, Descend.ItemData[i].AssetID, Descend.ItemData[i].GroupID, 100, Descend.ItemData[i].OwnerID, Descend.ItemData[i].CreatorID, Descend.ItemData[i].ItemID, Descend.ItemData[i].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS);
}
userInfo.OutPacket(Descend);
@@ -286,7 +285,7 @@ namespace OpenSim.Assets
InventoryReply.InventoryData[0].SalePrice = 100;
InventoryReply.InventoryData[0].SaleType = 0;
InventoryReply.InventoryData[0].Type = Item.Type;
InventoryReply.InventoryData[0].CRC = libsecondlife.Helpers.InventoryCRC(1000, 0, InventoryReply.InventoryData[0].InvType, InventoryReply.InventoryData[0].Type, InventoryReply.InventoryData[0].AssetID, InventoryReply.InventoryData[0].GroupID, 100, InventoryReply.InventoryData[0].OwnerID, InventoryReply.InventoryData[0].CreatorID, InventoryReply.InventoryData[0].ItemID, InventoryReply.InventoryData[0].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS);
InventoryReply.InventoryData[0].CRC = Helpers.InventoryCRC(1000, 0, InventoryReply.InventoryData[0].InvType, InventoryReply.InventoryData[0].Type, InventoryReply.InventoryData[0].AssetID, InventoryReply.InventoryData[0].GroupID, 100, InventoryReply.InventoryData[0].OwnerID, InventoryReply.InventoryData[0].CreatorID, InventoryReply.InventoryData[0].ItemID, InventoryReply.InventoryData[0].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS);
userInfo.OutPacket(InventoryReply);
}
}
@@ -320,7 +319,7 @@ namespace OpenSim.Assets
InventoryReply.InventoryData[0].SalePrice = 100;
InventoryReply.InventoryData[0].SaleType = 0;
InventoryReply.InventoryData[0].Type = Item.Type;
InventoryReply.InventoryData[0].CRC = libsecondlife.Helpers.InventoryCRC(1000, 0, InventoryReply.InventoryData[0].InvType, InventoryReply.InventoryData[0].Type, InventoryReply.InventoryData[0].AssetID, InventoryReply.InventoryData[0].GroupID, 100, InventoryReply.InventoryData[0].OwnerID, InventoryReply.InventoryData[0].CreatorID, InventoryReply.InventoryData[0].ItemID, InventoryReply.InventoryData[0].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS);
InventoryReply.InventoryData[0].CRC = Helpers.InventoryCRC(1000, 0, InventoryReply.InventoryData[0].InvType, InventoryReply.InventoryData[0].Type, InventoryReply.InventoryData[0].AssetID, InventoryReply.InventoryData[0].GroupID, 100, InventoryReply.InventoryData[0].OwnerID, InventoryReply.InventoryData[0].CreatorID, InventoryReply.InventoryData[0].ItemID, InventoryReply.InventoryData[0].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS);
remoteClient.OutPacket(InventoryReply);
}

View File

@@ -25,13 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.Net.Sockets;
using libsecondlife;
namespace OpenSim.Region.ClientStack
{

View File

@@ -27,14 +27,14 @@
*/
using System;
using System.Collections.Generic;
using System.Net;
using System.Text;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Inventory;
using OpenSim.Framework.Types;
using Axiom.MathLib;
using libsecondlife;
using libsecondlife.Packets;
using System.Net;
using OpenSim.Framework.Console;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types;
namespace OpenSim.Region.ClientStack
{
@@ -137,7 +137,7 @@ namespace OpenSim.Region.ClientStack
/// <param name="regionInfo"></param>
public void SendRegionHandshake(RegionInfo regionInfo)
{
System.Text.Encoding _enc = System.Text.Encoding.ASCII;
Encoding _enc = Encoding.ASCII;
RegionHandshakePacket handshake = new RegionHandshakePacket();
handshake.RegionInfo.BillableFactor = regionInfo.estateSettings.billableFactor;
@@ -219,8 +219,8 @@ namespace OpenSim.Region.ClientStack
/// <param name="fromAgentID"></param>
public void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID)
{
System.Text.Encoding enc = System.Text.Encoding.ASCII;
libsecondlife.Packets.ChatFromSimulatorPacket reply = new ChatFromSimulatorPacket();
Encoding enc = Encoding.ASCII;
ChatFromSimulatorPacket reply = new ChatFromSimulatorPacket();
reply.ChatData.Audible = 1;
reply.ChatData.Message = message;
reply.ChatData.ChatType = type;
@@ -260,7 +260,7 @@ namespace OpenSim.Region.ClientStack
}
catch (Exception e)
{
OpenSim.Framework.Console.MainLog.Instance.Warn("ClientView API.cs: SendLayerData() - Failed with exception " + e.ToString());
MainLog.Instance.Warn("ClientView API.cs: SendLayerData() - Failed with exception " + e.ToString());
}
}
@@ -286,7 +286,7 @@ namespace OpenSim.Region.ClientStack
}
catch (Exception e)
{
OpenSim.Framework.Console.MainLog.Instance.Warn("ClientView API .cs: SendLayerData() - Failed with exception " + e.ToString());
MainLog.Instance.Warn("ClientView API .cs: SendLayerData() - Failed with exception " + e.ToString());
}
}
@@ -298,7 +298,7 @@ namespace OpenSim.Region.ClientStack
/// <param name="neighbourPort"></param>
public void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourEndPoint )
{
System.Net.IPAddress neighbourIP = neighbourEndPoint.Address;
IPAddress neighbourIP = neighbourEndPoint.Address;
ushort neighbourPort = (ushort) neighbourEndPoint.Port;
EnableSimulatorPacket enablesimpacket = new EnableSimulatorPacket();
@@ -343,7 +343,7 @@ namespace OpenSim.Region.ClientStack
newSimPack.Info = new CrossedRegionPacket.InfoBlock();
newSimPack.Info.Position = pos;
newSimPack.Info.LookAt = look; // new LLVector3(0.0f, 0.0f, 0.0f); // copied from Avatar.cs - SHOULD BE DYNAMIC!!!!!!!!!!
newSimPack.RegionData = new libsecondlife.Packets.CrossedRegionPacket.RegionDataBlock();
newSimPack.RegionData = new CrossedRegionPacket.RegionDataBlock();
newSimPack.RegionData.RegionHandle = newRegionHandle;
byte[] byteIP = externalIPEndPoint.Address.GetAddressBytes();
newSimPack.RegionData.SimIP = (uint)byteIP[3] << 24;
@@ -359,7 +359,7 @@ namespace OpenSim.Region.ClientStack
public void SendMapBlock(List<MapBlockData> mapBlocks)
{
System.Text.Encoding _enc = System.Text.Encoding.ASCII;
Encoding _enc = Encoding.ASCII;
MapBlockReplyPacket mapReply = new MapBlockReplyPacket();
mapReply.AgentData.AgentID = this.AgentID;
@@ -514,20 +514,20 @@ namespace OpenSim.Region.ClientStack
/// <param name="Pos"></param>
public void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos, byte[] textureEntry)
{
System.Text.Encoding _enc = System.Text.Encoding.ASCII;
Encoding _enc = Encoding.ASCII;
//send a objectupdate packet with information about the clients avatar
ObjectUpdatePacket objupdate = new ObjectUpdatePacket();
objupdate.RegionData.RegionHandle = regionHandle;
objupdate.RegionData.TimeDilation = 64096;
objupdate.ObjectData = new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock[1];
objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
objupdate.ObjectData[0] = this.CreateDefaultAvatarPacket(textureEntry);
//give this avatar object a local id and assign the user a name
objupdate.ObjectData[0].ID = avatarLocalID;
objupdate.ObjectData[0].FullID = avatarID;
objupdate.ObjectData[0].NameValue = _enc.GetBytes("FirstName STRING RW SV " + firstName + "\nLastName STRING RW SV " + lastName + " \0");
libsecondlife.LLVector3 pos2 = new LLVector3((float)Pos.X, (float)Pos.Y, (float)Pos.Z);
LLVector3 pos2 = new LLVector3((float)Pos.X, (float)Pos.Y, (float)Pos.Z);
byte[] pb = pos2.GetBytes();
Array.Copy(pb, 0, objupdate.ObjectData[0].ObjectData, 16, pb.Length);
@@ -716,9 +716,9 @@ namespace OpenSim.Region.ClientStack
ushort InternVelocityX;
ushort InternVelocityY;
ushort InternVelocityZ;
Axiom.MathLib.Vector3 internDirec = new Axiom.MathLib.Vector3(0, 0, 0);
Vector3 internDirec = new Vector3(0, 0, 0);
internDirec = new Axiom.MathLib.Vector3(velocity.X, velocity.Y, velocity.Z);
internDirec = new Vector3(velocity.X, velocity.Y, velocity.Z);
internDirec = internDirec / 128.0f;
internDirec.x += 1;
@@ -961,7 +961,7 @@ namespace OpenSim.Region.ClientStack
/// <returns></returns>
protected ObjectUpdatePacket.ObjectDataBlock CreateDefaultAvatarPacket(byte[] textureEntry)
{
libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock objdata = new ObjectUpdatePacket.ObjectDataBlock(); // new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock(data1, ref i);
ObjectUpdatePacket.ObjectDataBlock objdata = new ObjectUpdatePacket.ObjectDataBlock(); // new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock(data1, ref i);
SetDefaultAvatarPacketValues(ref objdata);
objdata.UpdateFlags = 61 + (9 << 8) + (130 << 16) + (16 << 24);
@@ -977,12 +977,12 @@ namespace OpenSim.Region.ClientStack
{
objdata.TextureEntry = textureEntry;
}
System.Text.Encoding enc = System.Text.Encoding.ASCII;
libsecondlife.LLVector3 pos = new LLVector3(objdata.ObjectData, 16);
Encoding enc = Encoding.ASCII;
LLVector3 pos = new LLVector3(objdata.ObjectData, 16);
pos.X = 100f;
objdata.ID = 8880000;
objdata.NameValue = enc.GetBytes("FirstName STRING RW SV Test \nLastName STRING RW SV User \0");
libsecondlife.LLVector3 pos2 = new LLVector3(100f, 100f, 23f);
LLVector3 pos2 = new LLVector3(100f, 100f, 23f);
//objdata.FullID=user.AgentID;
byte[] pb = pos.GetBytes();
Array.Copy(pb, 0, objdata.ObjectData, 16, pb.Length);

View File

@@ -27,14 +27,13 @@
*/
using System;
using System.Collections.Generic;
using System.Text;
using OpenSim.Assets;
using OpenSim.Framework.Types;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Utilities;
using OpenSim.Region.Caches;
using libsecondlife;
using libsecondlife.Packets;
using OpenSim.Assets;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types;
using OpenSim.Framework.Utilities;
using OpenSim.Region.Caches;
namespace OpenSim.Region.ClientStack
{

View File

@@ -25,22 +25,9 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
using System;
using System.Collections;
using System.Collections.Generic;
using libsecondlife;
using libsecondlife.Packets;
using Nwc.XmlRpc;
using System.Net;
using System.Net.Sockets;
using System.IO;
using System.Threading;
using System.Timers;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types;
using OpenSim.Framework.Inventory;
using OpenSim.Framework.Utilities;
using OpenSim.Assets;
using OpenSim.Framework.Console;
namespace OpenSim.Region.ClientStack
{
@@ -55,7 +42,7 @@ namespace OpenSim.Region.ClientStack
protected virtual bool Logout(ClientView simClient, Packet packet)
{
OpenSim.Framework.Console.MainLog.Instance.Verbose( "OpenSimClient.cs:ProcessInPacket() - Got a logout request");
MainLog.Instance.Verbose( "OpenSimClient.cs:ProcessInPacket() - Got a logout request");
//send reply to let the client logout
LogoutReplyPacket logReply = new LogoutReplyPacket();
logReply.AgentData.AgentID = this.AgentID;
@@ -120,7 +107,7 @@ namespace OpenSim.Region.ClientStack
{
if (OnUpdatePrimPosition != null)
{
libsecondlife.LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
OnUpdatePrimPosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this);
}
//should update stored position of the prim
@@ -129,7 +116,7 @@ namespace OpenSim.Region.ClientStack
{
if (OnUpdatePrimRotation != null)
{
libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true);
LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true);
OnUpdatePrimRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this);
}
}
@@ -137,7 +124,7 @@ namespace OpenSim.Region.ClientStack
{
if (OnUpdatePrimScale != null)
{
libsecondlife.LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12);
LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12);
OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this);
}
}

View File

@@ -26,21 +26,13 @@
*
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using libsecondlife;
using libsecondlife.Packets;
using Nwc.XmlRpc;
using System.Net;
using System.Net.Sockets;
using System.IO;
using System.Threading;
using System.Timers;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types;
using OpenSim.Framework.Inventory;
using OpenSim.Framework.Types;
using OpenSim.Framework.Utilities;
using OpenSim.Assets;
namespace OpenSim.Region.ClientStack
{
@@ -64,7 +56,7 @@ namespace OpenSim.Region.ClientStack
}
else
{
System.Text.Encoding _enc = System.Text.Encoding.ASCII;
Encoding _enc = Encoding.ASCII;
switch (Pack.Type)
{
@@ -452,7 +444,7 @@ namespace OpenSim.Region.ClientStack
this.OutPacket(tpStart);
TeleportProgressPacket tpProgress = new TeleportProgressPacket();
tpProgress.Info.Message = (new System.Text.ASCIIEncoding()).GetBytes("sending_landmark");
tpProgress.Info.Message = (new ASCIIEncoding()).GetBytes("sending_landmark");
tpProgress.Info.TeleportFlags = 8;
tpProgress.AgentData.AgentID = tpReq.Info.AgentID;
this.OutPacket(tpProgress);

View File

@@ -25,24 +25,22 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
using System;
using System.Collections;
using System.Collections.Generic;
using libsecondlife;
using libsecondlife.Packets;
using Nwc.XmlRpc;
using System.Net;
using System.Net.Sockets;
using System.IO;
using System.Text;
using System.Threading;
using System.Timers;
using OpenSim.Framework;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types;
using OpenSim.Framework.Inventory;
using OpenSim.Framework.Utilities;
using libsecondlife;
using libsecondlife.Packets;
using OpenSim.Assets;
using OpenSim.Framework;
using OpenSim.Framework.Console;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Inventory;
using OpenSim.Framework.Types;
using OpenSim.Framework.Utilities;
using OpenSim.Region.Caches;
using Timer=System.Timers.Timer;
namespace OpenSim.Region.ClientStack
{
@@ -79,7 +77,7 @@ namespace OpenSim.Region.ClientStack
private int cachedtextureserial = 0;
private RegionInfo m_regionData;
protected AuthenticateSessionsBase m_authenticateSessionsHandler;
private System.Text.Encoding enc = System.Text.Encoding.ASCII;
private Encoding enc = Encoding.ASCII;
public ClientView(EndPoint remoteEP, UseCircuitCodePacket initialcirpack, Dictionary<uint, ClientView> clientThreads, IWorld world, AssetCache assetCache, PacketServer packServer, InventoryCache inventoryCache, AuthenticateSessionsBase authenSessions )
{
@@ -91,7 +89,7 @@ namespace OpenSim.Region.ClientStack
m_inventoryCache = inventoryCache;
m_authenticateSessionsHandler = authenSessions;
OpenSim.Framework.Console.MainLog.Instance.Verbose( "OpenSimClient.cs - Started up new client thread to handle incoming request");
MainLog.Instance.Verbose( "OpenSimClient.cs - Started up new client thread to handle incoming request");
cirpack = initialcirpack;
userEP = remoteEP;
@@ -100,7 +98,7 @@ namespace OpenSim.Region.ClientStack
PacketQueue = new BlockingQueue<QueItem>();
this.UploadAssets = new AgentAssetUpload(this, m_assetCache, m_inventoryCache);
AckTimer = new System.Timers.Timer(500);
AckTimer = new Timer(500);
AckTimer.Elapsed += new ElapsedEventHandler(AckTimer_Elapsed);
AckTimer.Start();
@@ -189,7 +187,7 @@ namespace OpenSim.Region.ClientStack
protected virtual void ClientLoop()
{
OpenSim.Framework.Console.MainLog.Instance.Verbose( "OpenSimClient.cs:ClientLoop() - Entered loop");
MainLog.Instance.Verbose( "OpenSimClient.cs:ClientLoop() - Entered loop");
while (true)
{
QueItem nextPacket = PacketQueue.Dequeue();
@@ -211,7 +209,7 @@ namespace OpenSim.Region.ClientStack
protected virtual void InitNewClient()
{
OpenSim.Framework.Console.MainLog.Instance.Verbose( "OpenSimClient.cs:InitNewClient() - Adding viewer agent to world");
MainLog.Instance.Verbose( "OpenSimClient.cs:InitNewClient() - Adding viewer agent to world");
this.m_world.AddNewClient(this, false);
}
@@ -222,12 +220,12 @@ namespace OpenSim.Region.ClientStack
if (!sessionInfo.Authorised)
{
//session/circuit not authorised
OpenSim.Framework.Console.MainLog.Instance.Notice("OpenSimClient.cs:AuthUser() - New user request denied to " + userEP.ToString());
MainLog.Instance.Notice("OpenSimClient.cs:AuthUser() - New user request denied to " + userEP.ToString());
ClientThread.Abort();
}
else
{
OpenSim.Framework.Console.MainLog.Instance.Notice("OpenSimClient.cs:AuthUser() - Got authenticated connection from " + userEP.ToString());
MainLog.Instance.Notice("OpenSimClient.cs:AuthUser() - Got authenticated connection from " + userEP.ToString());
//session is authorised
this.AgentID = cirpack.CircuitCode.ID;
this.SessionID = cirpack.CircuitCode.SessionID;

View File

@@ -27,17 +27,14 @@
*
*/
using System;
using System.Collections;
using System.Collections.Generic;
using libsecondlife;
using libsecondlife.Packets;
using System.Net;
using System.Net.Sockets;
using System.IO;
using System.Threading;
using System.Timers;
using libsecondlife;
using libsecondlife.Packets;
using OpenSim.Framework.Console;
using OpenSim.Framework.Utilities;
using OpenSim.Framework.Interfaces;
namespace OpenSim.Region.ClientStack
{
@@ -47,7 +44,7 @@ namespace OpenSim.Region.ClientStack
protected Dictionary<uint, uint> PendingAcks = new Dictionary<uint, uint>();
protected Dictionary<uint, Packet> NeedAck = new Dictionary<uint, Packet>();
protected System.Timers.Timer AckTimer;
protected Timer AckTimer;
protected uint Sequence = 0;
protected object SequenceLock = new object();
protected const int MAX_APPENDED_ACKS = 10;
@@ -159,7 +156,7 @@ namespace OpenSim.Region.ClientStack
}
catch (Exception)
{
OpenSim.Framework.Console.MainLog.Instance.Warn("OpenSimClient.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection " + userEP.ToString() + " - killing thread");
MainLog.Instance.Warn("OpenSimClient.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection " + userEP.ToString() + " - killing thread");
this.KillThread();
}
@@ -195,8 +192,8 @@ namespace OpenSim.Region.ClientStack
else if ((NewPack.Type == PacketType.StartPingCheck))
{
//reply to pingcheck
libsecondlife.Packets.StartPingCheckPacket startPing = (libsecondlife.Packets.StartPingCheckPacket)NewPack;
libsecondlife.Packets.CompletePingCheckPacket endPing = new CompletePingCheckPacket();
StartPingCheckPacket startPing = (StartPingCheckPacket)NewPack;
CompletePingCheckPacket endPing = new CompletePingCheckPacket();
endPing.PingID.PingID = startPing.PingID.PingID;
OutPacket(endPing);
}
@@ -224,7 +221,7 @@ namespace OpenSim.Region.ClientStack
{
if (Pack.Header.Reliable)
{
libsecondlife.Packets.PacketAckPacket ack_it = new PacketAckPacket();
PacketAckPacket ack_it = new PacketAckPacket();
ack_it.Packets = new PacketAckPacket.PacketsBlock[1];
ack_it.Packets[0] = new PacketAckPacket.PacketsBlock();
ack_it.Packets[0].ID = Pack.Header.Sequence;
@@ -254,7 +251,7 @@ namespace OpenSim.Region.ClientStack
{
if ((now - packet.TickCount > RESEND_TIMEOUT) && (!packet.Header.Resent))
{
OpenSim.Framework.Console.MainLog.Instance.Verbose( "Resending " + packet.Type.ToString() + " packet, " +
MainLog.Instance.Verbose( "Resending " + packet.Type.ToString() + " packet, " +
(now - packet.TickCount) + "ms have passed");
packet.Header.Resent = true;
@@ -273,7 +270,7 @@ namespace OpenSim.Region.ClientStack
if (PendingAcks.Count > 250)
{
// FIXME: Handle the odd case where we have too many pending ACKs queued up
OpenSim.Framework.Console.MainLog.Instance.Verbose( "Too many ACKs queued up!");
MainLog.Instance.Verbose( "Too many ACKs queued up!");
return;
}

View File

@@ -25,15 +25,13 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
using System;
using System.Collections.Generic;
using System.Text;
using libsecondlife.Packets;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework;
using System.Net;
using System.Net.Sockets;
using libsecondlife.Packets;
using OpenSim.Assets;
using OpenSim.Framework;
using OpenSim.Framework.Interfaces;
using OpenSim.Region.Caches;
namespace OpenSim.Region.ClientStack

View File

@@ -26,27 +26,16 @@
*
*/
using System;
using System.Text;
using System.IO;
using System.Threading;
using System.Net;
using System.Net.Sockets;
using System.Timers;
using System.Reflection;
using System.Collections;
using System.Collections.Generic;
using libsecondlife;
using libsecondlife.Packets;
using OpenSim.Region.Terrain;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types;
using OpenSim.Framework;
using System.Net;
using OpenSim.Assets;
using OpenSim.Region.Caches;
using OpenSim.Framework;
using OpenSim.Framework.Console;
using OpenSim.Physics.Manager;
using Nwc.XmlRpc;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Types;
using OpenSim.Physics.Manager;
using OpenSim.Region.Caches;
namespace OpenSim.Region.ClientStack
{

View File

@@ -26,26 +26,15 @@
*
*/
using System;
using System.Text;
using System.IO;
using System.Threading;
using System.Collections.Generic;
using System.Net;
using System.Net.Sockets;
using System.Timers;
using System.Reflection;
using System.Collections;
using System.Collections.Generic;
using libsecondlife;
using libsecondlife.Packets;
using OpenSim.Region.Terrain;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types;
using OpenSim.Assets;
using OpenSim.Region.Caches;
using OpenSim.Framework.Console;
using OpenSim.Framework;
using Nwc.XmlRpc;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Console;
using OpenSim.Framework.Interfaces;
using OpenSim.Region.Caches;
namespace OpenSim.Region.ClientStack
{