mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
* optimized usings.
This commit is contained in:
@@ -31,9 +31,6 @@ using System.Reflection;
|
||||
using log4net;
|
||||
using Nini.Config;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.ClientStack;
|
||||
using OpenSim.Framework.Communications;
|
||||
using OpenSim.Framework.Communications.Cache;
|
||||
|
||||
namespace OpenSim.Region.ClientStack
|
||||
{
|
||||
|
||||
@@ -30,7 +30,6 @@ using System.Net.Sockets;
|
||||
using Nini.Config;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Framework.Communications.Cache;
|
||||
|
||||
namespace OpenSim.Region.ClientStack
|
||||
{
|
||||
|
||||
@@ -25,9 +25,6 @@
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using OpenMetaverse.Packets;
|
||||
|
||||
namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
|
||||
@@ -33,17 +33,16 @@ using System.Text;
|
||||
using System.Threading;
|
||||
using System.Timers;
|
||||
using System.Xml;
|
||||
using log4net;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.Packets;
|
||||
using OpenMetaverse.StructuredData;
|
||||
using log4net;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Client;
|
||||
using OpenSim.Framework.Communications.Cache;
|
||||
using OpenSim.Framework.Statistics;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using Timer = System.Timers.Timer;
|
||||
using Timer=System.Timers.Timer;
|
||||
|
||||
namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
{
|
||||
@@ -474,7 +473,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
m_PacketHandler.OnPacketStats += PopulateStats;
|
||||
|
||||
RegisterLocalPacketHandlers();
|
||||
m_imageManager = new LLImageManager(this, m_assetCache,Scene.RequestModuleInterface<OpenSim.Region.Framework.Interfaces.IJ2KDecoder>());
|
||||
m_imageManager = new LLImageManager(this, m_assetCache,Scene.RequestModuleInterface<IJ2KDecoder>());
|
||||
}
|
||||
|
||||
public void SetDebugPacketLevel(int newDebugPacketLevel)
|
||||
@@ -1230,7 +1229,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
fromAgent, toAgent, false, false, false);
|
||||
}
|
||||
|
||||
System.Console.WriteLine("SendInstantMessage: " + msg);
|
||||
Console.WriteLine("SendInstantMessage: " + msg);
|
||||
}
|
||||
else
|
||||
OutPacket(msg, ThrottleOutPacketType.Task);
|
||||
@@ -6857,15 +6856,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
groupTitlesRequest.AgentData.GroupID);
|
||||
|
||||
groupTitlesReply.GroupData =
|
||||
new GroupTitlesReplyPacket.
|
||||
GroupDataBlock[titles.Count];
|
||||
new GroupTitlesReplyPacket.GroupDataBlock[titles.Count];
|
||||
|
||||
int i = 0;
|
||||
foreach (GroupTitlesData d in titles)
|
||||
{
|
||||
groupTitlesReply.GroupData[i] =
|
||||
new GroupTitlesReplyPacket.
|
||||
GroupDataBlock();
|
||||
new GroupTitlesReplyPacket.GroupDataBlock();
|
||||
|
||||
groupTitlesReply.GroupData[i].Title =
|
||||
Utils.StringToBytes(d.Name);
|
||||
@@ -6980,8 +6977,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
groupRolesReply.AgentData.AgentID = AgentId;
|
||||
|
||||
groupRolesReply.GroupData =
|
||||
new GroupRoleDataReplyPacket.
|
||||
GroupDataBlock();
|
||||
new GroupRoleDataReplyPacket.GroupDataBlock();
|
||||
|
||||
groupRolesReply.GroupData.GroupID =
|
||||
groupRolesRequest.GroupData.GroupID;
|
||||
@@ -6997,15 +6993,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
titles.Count;
|
||||
|
||||
groupRolesReply.RoleData =
|
||||
new GroupRoleDataReplyPacket.
|
||||
RoleDataBlock[titles.Count];
|
||||
new GroupRoleDataReplyPacket.RoleDataBlock[titles.Count];
|
||||
|
||||
int i = 0;
|
||||
foreach (GroupRolesData d in titles)
|
||||
{
|
||||
groupRolesReply.RoleData[i] =
|
||||
new GroupRoleDataReplyPacket.
|
||||
RoleDataBlock();
|
||||
new GroupRoleDataReplyPacket.RoleDataBlock();
|
||||
|
||||
groupRolesReply.RoleData[i].RoleID =
|
||||
d.RoleID;
|
||||
@@ -7051,15 +7045,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
(uint)mappings.Count;
|
||||
|
||||
groupRoleMembersReply.MemberData =
|
||||
new GroupRoleMembersReplyPacket.
|
||||
MemberDataBlock[mappings.Count];
|
||||
new GroupRoleMembersReplyPacket.MemberDataBlock[mappings.Count];
|
||||
|
||||
int i = 0;
|
||||
foreach (GroupRoleMembersData d in mappings)
|
||||
{
|
||||
groupRoleMembersReply.MemberData[i] =
|
||||
new GroupRoleMembersReplyPacket.
|
||||
MemberDataBlock();
|
||||
new GroupRoleMembersReplyPacket.MemberDataBlock();
|
||||
|
||||
groupRoleMembersReply.MemberData[i].RoleID =
|
||||
d.RoleID;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
@@ -27,16 +27,8 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.Packets;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Client;
|
||||
using OpenSim.Framework.Communications.Cache;
|
||||
using OpenSim.Framework.Statistics;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
|
||||
namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
@@ -27,13 +27,11 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using C5;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.Imaging;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using C5;
|
||||
using OpenSim.Framework.Communications.Cache;
|
||||
using OpenMetaverse.Imaging;
|
||||
|
||||
|
||||
namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
{
|
||||
|
||||
@@ -26,19 +26,14 @@
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Threading;
|
||||
using System.Timers;
|
||||
using System.Reflection;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.Packets;
|
||||
using Timer = System.Timers.Timer;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.ClientStack.LindenUDP;
|
||||
using log4net;
|
||||
using Timer=System.Timers.Timer;
|
||||
|
||||
namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
{
|
||||
@@ -96,7 +91,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
private Dictionary<uint, int> m_DupeTracker =
|
||||
new Dictionary<uint, int>();
|
||||
private uint m_DupeTrackerWindow = 30;
|
||||
private int m_DupeTrackerLastCheck = System.Environment.TickCount;
|
||||
private int m_DupeTrackerLastCheck = Environment.TickCount;
|
||||
|
||||
// Values for the SimStatsReporter
|
||||
//
|
||||
@@ -164,7 +159,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
{
|
||||
m_Client = client;
|
||||
m_PacketServer = server;
|
||||
m_DropSafeTimeout = System.Environment.TickCount + 15000;
|
||||
m_DropSafeTimeout = Environment.TickCount + 15000;
|
||||
|
||||
m_PacketQueue = new LLPacketQueue(client.AgentId, userSettings);
|
||||
|
||||
@@ -225,9 +220,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
// acks being appended to the payload, just don't send
|
||||
// any with them until libsl is fixed.
|
||||
//
|
||||
if (packet is OpenMetaverse.Packets.ViewerEffectPacket)
|
||||
if (packet is ViewerEffectPacket)
|
||||
return;
|
||||
if (packet is OpenMetaverse.Packets.SimStatsPacket)
|
||||
if (packet is SimStatsPacket)
|
||||
return;
|
||||
|
||||
// Add acks to outgoing packets
|
||||
@@ -261,7 +256,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
item.Packet = packet;
|
||||
item.Incoming = false;
|
||||
item.throttleType = throttlePacketType;
|
||||
item.TickCount = System.Environment.TickCount;
|
||||
item.TickCount = Environment.TickCount;
|
||||
item.Identifier = id;
|
||||
item.Resends = 0;
|
||||
item.Length = packet.ToBytes().Length;
|
||||
@@ -272,7 +267,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
|
||||
private void ResendUnacked()
|
||||
{
|
||||
int now = System.Environment.TickCount;
|
||||
int now = Environment.TickCount;
|
||||
|
||||
int intervalMs = 250;
|
||||
|
||||
@@ -341,7 +336,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
}
|
||||
|
||||
m_NeedAck[packet.Header.Sequence].TickCount =
|
||||
System.Environment.TickCount;
|
||||
Environment.TickCount;
|
||||
|
||||
QueuePacket(packet, ThrottleOutPacketType.Resend,
|
||||
data.Identifier);
|
||||
@@ -463,10 +458,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
if (m_DupeTracker.Count < 1024)
|
||||
return;
|
||||
|
||||
if (System.Environment.TickCount - m_DupeTrackerLastCheck < 2000)
|
||||
if (Environment.TickCount - m_DupeTrackerLastCheck < 2000)
|
||||
return;
|
||||
|
||||
m_DupeTrackerLastCheck = System.Environment.TickCount;
|
||||
m_DupeTrackerLastCheck = Environment.TickCount;
|
||||
|
||||
Dictionary<uint, int> packs =
|
||||
new Dictionary<uint, int>(m_DupeTracker);
|
||||
@@ -673,7 +668,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
item.Packet = packet;
|
||||
item.Incoming = false;
|
||||
item.throttleType = 0;
|
||||
item.TickCount = System.Environment.TickCount;
|
||||
item.TickCount = Environment.TickCount;
|
||||
item.Identifier = 0;
|
||||
item.Resends = 0;
|
||||
item.Length = packet.ToBytes().Length;
|
||||
@@ -741,7 +736,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
m_UnackedBytes += item.Length;
|
||||
|
||||
// Keep track of when this packet was sent out
|
||||
item.TickCount = System.Environment.TickCount;
|
||||
item.TickCount = Environment.TickCount;
|
||||
|
||||
m_NeedAck[packet.Header.Sequence] = item;
|
||||
}
|
||||
|
||||
@@ -27,23 +27,22 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using System.Timers;
|
||||
using log4net;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.Packets;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Statistics;
|
||||
using OpenSim.Framework.Statistics.Interfaces;
|
||||
using OpenSim.Region.ClientStack;
|
||||
using Timer=System.Timers.Timer;
|
||||
|
||||
|
||||
namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
{
|
||||
public class LLPacketQueue : IPullStatsProvider
|
||||
{
|
||||
private static readonly log4net.ILog m_log
|
||||
= log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private static readonly ILog m_log
|
||||
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <summary>
|
||||
/// Is queueing enabled at all?
|
||||
|
||||
@@ -27,12 +27,9 @@
|
||||
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.Packets;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Communications.Cache;
|
||||
|
||||
namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
{
|
||||
|
||||
@@ -31,11 +31,10 @@ using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Reflection;
|
||||
using OpenMetaverse.Packets;
|
||||
using log4net;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse.Packets;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Communications.Cache;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
|
||||
namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
@@ -304,7 +303,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
// the next set of UDP data is for a valid client.
|
||||
ResetServerEndPoint(e);
|
||||
}
|
||||
catch (System.ObjectDisposedException)
|
||||
catch (ObjectDisposedException)
|
||||
{
|
||||
m_log.Info("[UDPSERVER]: UDP Object disposed. No need to worry about this if you're restarting the simulator.");
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
*/
|
||||
|
||||
using OpenMetaverse;
|
||||
using System;
|
||||
|
||||
namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
{
|
||||
|
||||
@@ -26,17 +26,13 @@
|
||||
*/
|
||||
|
||||
using System.Net;
|
||||
using System.Threading;
|
||||
using log4net;
|
||||
using log4net.Config;
|
||||
using Nini.Config;
|
||||
using NUnit.Framework;
|
||||
using NUnit.Framework.SyntaxHelpers;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.Packets;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Communications;
|
||||
using OpenSim.Region.ClientStack;
|
||||
using OpenSim.Region.ClientStack.LindenUDP;
|
||||
|
||||
namespace OpenSim.Region.ClientStack.LindenUDP.Tests
|
||||
{
|
||||
@@ -51,7 +47,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
|
||||
{
|
||||
try
|
||||
{
|
||||
log4net.Config.XmlConfigurator.Configure();
|
||||
XmlConfigurator.Configure();
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -118,7 +114,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
|
||||
UseCircuitCodePacket uccp = new UseCircuitCodePacket();
|
||||
|
||||
UseCircuitCodePacket.CircuitCodeBlock uccpCcBlock
|
||||
= new OpenMetaverse.Packets.UseCircuitCodePacket.CircuitCodeBlock();
|
||||
= new UseCircuitCodePacket.CircuitCodeBlock();
|
||||
uccpCcBlock.Code = circuitCode;
|
||||
uccpCcBlock.ID = agentId;
|
||||
uccpCcBlock.SessionID = sessionId;
|
||||
@@ -169,7 +165,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests
|
||||
UseCircuitCodePacket uccp = new UseCircuitCodePacket();
|
||||
|
||||
UseCircuitCodePacket.CircuitCodeBlock uccpCcBlock
|
||||
= new OpenMetaverse.Packets.UseCircuitCodePacket.CircuitCodeBlock();
|
||||
= new UseCircuitCodePacket.CircuitCodeBlock();
|
||||
uccpCcBlock.Code = myCircuitCode;
|
||||
uccpCcBlock.ID = myAgentUuid;
|
||||
uccpCcBlock.SessionID = mySessionUuid;
|
||||
|
||||
@@ -25,8 +25,6 @@
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System.Xml;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
|
||||
@@ -25,14 +25,12 @@
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System.Threading;
|
||||
using Nini.Config;
|
||||
using NUnit.Framework;
|
||||
using NUnit.Framework.SyntaxHelpers;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.Packets;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.ClientStack.LindenUDP;
|
||||
using OpenSim.Tests.Common.Mock;
|
||||
|
||||
namespace OpenSim.Region.ClientStack.LindenUDP.Tests
|
||||
|
||||
@@ -26,9 +26,7 @@
|
||||
*/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.Packets;
|
||||
using OpenSim.Region.ClientStack.LindenUDP;
|
||||
|
||||
namespace OpenSim.Region.ClientStack.LindenUDP.Tests
|
||||
{
|
||||
|
||||
@@ -30,8 +30,6 @@ using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using OpenMetaverse.Packets;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Communications.Cache;
|
||||
|
||||
namespace OpenSim.Region.ClientStack.LindenUDP.Tests
|
||||
{
|
||||
|
||||
@@ -26,19 +26,16 @@
|
||||
*/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Reflection;
|
||||
using OpenMetaverse;
|
||||
using log4net;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Communications;
|
||||
using OpenSim.Framework.Communications.Cache;
|
||||
using OpenSim.Framework.Servers;
|
||||
using OpenSim.Region.Framework;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Region.CoreModules;
|
||||
using OpenSim.Region.Physics.Manager;
|
||||
|
||||
namespace OpenSim.Region.ClientStack
|
||||
|
||||
Reference in New Issue
Block a user