minor cleanup
parent
e1c20a32ca
commit
492ba8f644
|
@ -1815,14 +1815,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
// An inventory descendents packet consists of a single agent section and an inventory details
|
// An inventory descendents packet consists of a single agent section and an inventory details
|
||||||
// section for each inventory item. The size of each inventory item is approximately 550 bytes.
|
// section for each inventory item. The size of each inventory item is approximately 550 bytes.
|
||||||
// In theory, UDP has a maximum packet size of 64k, so it should be possible to send descendent
|
// limit to what may fit on MTU
|
||||||
// packets containing metadata for in excess of 100 items. But in practice, there may be other
|
|
||||||
// factors (e.g. firewalls) restraining the maximum UDP packet size. See,
|
|
||||||
//
|
|
||||||
// http://opensimulator.org/mantis/view.php?id=226
|
|
||||||
//
|
|
||||||
// for one example of this kind of thing. In fact, the Linden servers appear to only send about
|
|
||||||
// 6 to 7 items at a time, so let's stick with 6
|
|
||||||
int MAX_ITEMS_PER_PACKET = 5;
|
int MAX_ITEMS_PER_PACKET = 5;
|
||||||
int MAX_FOLDERS_PER_PACKET = 6;
|
int MAX_FOLDERS_PER_PACKET = 6;
|
||||||
|
|
||||||
|
|
|
@ -279,11 +279,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
/// OnQueueEmpty event is triggered for textures</summary>
|
/// OnQueueEmpty event is triggered for textures</summary>
|
||||||
public readonly int TextureSendLimit;
|
public readonly int TextureSendLimit;
|
||||||
|
|
||||||
/// <summary>Handlers for incoming packets</summary>
|
|
||||||
//PacketEventDictionary packetEvents = new PacketEventDictionary();
|
|
||||||
/// <summary>Incoming packets that are awaiting handling</summary>
|
|
||||||
//protected OpenMetaverse.BlockingQueue<IncomingPacket> packetInbox = new OpenMetaverse.BlockingQueue<IncomingPacket>();
|
|
||||||
|
|
||||||
protected BlockingCollection<IncomingPacket> packetInbox = new BlockingCollection<IncomingPacket>();
|
protected BlockingCollection<IncomingPacket> packetInbox = new BlockingCollection<IncomingPacket>();
|
||||||
|
|
||||||
/// <summary>Bandwidth throttle for this UDP server</summary>
|
/// <summary>Bandwidth throttle for this UDP server</summary>
|
||||||
|
@ -374,12 +369,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int IncomingOrphanedPacketCount { get; protected set; }
|
public int IncomingOrphanedPacketCount { get; protected set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Queue some low priority but potentially high volume async requests so that they don't overwhelm available
|
|
||||||
/// threadpool threads.
|
|
||||||
/// </summary>
|
|
||||||
// public JobEngine IpahEngine { get; protected set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Run queue empty processing within a single persistent thread.
|
/// Run queue empty processing within a single persistent thread.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -557,12 +546,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
Scene = (Scene)scene;
|
Scene = (Scene)scene;
|
||||||
m_location = new Location(Scene.RegionInfo.RegionHandle);
|
m_location = new Location(Scene.RegionInfo.RegionHandle);
|
||||||
/*
|
|
||||||
IpahEngine
|
|
||||||
= new JobEngine(
|
|
||||||
string.Format("Incoming Packet Async Handling Engine ({0})", Scene.Name),
|
|
||||||
"INCOMING PACKET ASYNC HANDLING ENGINE");
|
|
||||||
*/
|
|
||||||
OqrEngine = new JobEngine(
|
OqrEngine = new JobEngine(
|
||||||
string.Format("Outgoing Queue Refill Engine ({0})", Scene.Name),
|
string.Format("Outgoing Queue Refill Engine ({0})", Scene.Name),
|
||||||
"OUTGOING QUEUE REFILL ENGINE");
|
"OUTGOING QUEUE REFILL ENGINE");
|
||||||
|
@ -844,13 +828,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
bool doZerocode = (data[0] & Helpers.MSG_ZEROCODED) != 0;
|
bool doZerocode = (data[0] & Helpers.MSG_ZEROCODED) != 0;
|
||||||
bool doCopy = true;
|
bool doCopy = true;
|
||||||
|
|
||||||
// Frequency analysis of outgoing packet sizes shows a large clump of packets at each end of the spectrum.
|
|
||||||
// The vast majority of packets are less than 200 bytes, although due to asset transfers and packet splitting
|
|
||||||
// there are a decent number of packets in the 1000-1140 byte range. We allocate one of two sizes of data here
|
|
||||||
// to accomodate for both common scenarios and provide ample room for ACK appending in both
|
|
||||||
//int bufferSize = (dataLength > 180) ? LLUDPServer.MTU : 200;
|
|
||||||
|
|
||||||
//UDPPacketBuffer buffer = new UDPPacketBuffer(udpClient.RemoteEndPoint, bufferSize);
|
|
||||||
UDPPacketBuffer buffer = GetNewUDPBuffer(udpClient.RemoteEndPoint);
|
UDPPacketBuffer buffer = GetNewUDPBuffer(udpClient.RemoteEndPoint);
|
||||||
|
|
||||||
// Zerocode if needed
|
// Zerocode if needed
|
||||||
|
|
Loading…
Reference in New Issue