Commit Graph

13 Commits (d4825e4af23b203dd94a2d1c261cbd11102bbd54)

Author SHA1 Message Date
dahlia d1ed16be71 backport libomv r3475 - mainly for binary OSD serialization compatibility newer versions of OpenMetaverse.StructuredData.dll 2010-12-21 20:09:06 -08:00
John Hurliman 6492640e72 * Change the OnQueueEmpty signature to send the flags of the queues that are empty instead of firing once per empty queue
* Change the OnQueueEmpty firing to use a minimum time until next fire instead of a sleep
* Set OutgoingPacket.TickCount = 0 earlier to avoid extra resends when things are running slowly (inside a profiler, for example)
2009-10-21 18:03:41 -07:00
John Hurliman 4e04f6b3a5 * Clarified what FireQueueEmpty is doing with a MIN_CALLBACK_MS constant and upped it to 30ms
* Removed the unused PacketSent() function
* Switched UnackedPacketCollection from a SortedDictionary to a Dictionary now that the sorting is no longer needed. Big performance improvement for ResendUnacked()
2009-10-21 17:02:55 -07:00
John Hurliman b06f258319 * FireQueueEmpty now checks if a measurable amount of time has passed, and if not it sleeps for a small amount of time. This throttles OnQueueEmpty calls where there is no callback or the callback is doing very little work
* Changed HandleQueueEmpty()'s Monitor.TryEnter() calls to locks. We want to take our time in this function and do all the work necessary, since returning too fast will induce a sleep anyways
2009-10-21 16:21:08 -07:00
John Hurliman 7ee422a344 * Handle UseCircuitCode packets asynchronously. Adding an agent to a scene can take several seconds, and was blocking up packet handling in the meantime
* Clamp retransmission timeout values between three and 10 seconds
* Log outgoing time for a packet right after it is sent instead of well before
* Loop through the entire UnackedPacketCollection when looking for expired packets
2009-10-21 13:47:16 -07:00
John Hurliman 9178537e94 * Replaced the UnackedPacketCollection with a lockless implementation. The tiny amount of time spent in the locks turned into a lot of time when the rest of the LLUDP implementation went lockless
* Changed the timer tracking numbers for each client to not have "memory". It will no longer queue up calls to functions like ResendUnacked
* Reverted Jim's WaitHandle code. Although it was technically more correct, it exhibited the exact same behavior as the old code but spent more cycles. The 20ms has been replaced with the minimum amount of time before a token bucket could receive a drip, and an else { sleep(0); } was added to make sure the outgoing packet handler always yields at least a minimum amount
2009-10-21 11:59:48 -07:00
John Hurliman 45dc4e0a54 * Added a sanity check to GetScriptAssemblies() and GetScriptStates() for the case where no scripting engine is enabled
* Added TokenBucket.cs to OpenSim, with some fixes for setting a more accurate MaxBurst value and getting a more accurate Content value (by Drip()ing each get)
2009-10-20 18:19:17 -07:00
John Hurliman e8c1e69a0d * Copied LocklessQueue.cs into OpenSim.Framework and added the .Count property and .Clear() method
* Changed the way the QueueEmpty callback is fired. It will be fired asynchronously as soon as an empty queue is detected (this can happen immediately following a dequeue), and will not be fired again until at least one packet is dequeued from that queue. This will give callbacks advanced notice of an empty queue and prevent callbacks from stacking up while the queue is empty
* Added LLUDPClient.IsConnected checks in several places to prevent unwanted network activity after a client disconnects
* Prevent LLClientView.Close() from being called twice every disconnect
* Removed the packet resend limit and improved the client timeout check
2009-10-13 18:56:54 -07:00
John Hurliman 9cb5db3621 Applying the real fix (thank you for tracking that MSDN doc down Melanie) 2009-10-06 15:08:09 -07:00
John Hurliman 74fe284a20 Trying Melanie's fix 2009-10-06 14:50:46 -07:00
John Hurliman 25676ac5cf * Added a sanity check for Mono before trying to enumerate over an empty SortedDictionary
* Changed the order of a log line from DotNetEngine so you can tell whether or not it is actually loading
2009-10-06 13:39:10 -07:00
John Hurliman 61b5372153 * Added missing references to prebuild.xml and commented out the LindenUDP tests until a new test harness is written
* Clients are no longer disconnected when a packet handler crashes. We'll see how this works out in practice
* Added documentation and cleanup, getting ready for the first public push
* Deleted an old LLUDP file
2009-10-06 12:13:16 -07:00
John Hurliman e7c877407f * Continued work on the new LLUDP implementation. Appears to be functioning, although not everything is reimplemented yet
* Replaced logic in ThreadTracker with a call to System.Diagnostics that does the same thing
* Added Util.StringToBytes256() and Util.StringToBytes1024() to clamp output at byte[256] and byte[1024], respectively
* Fixed formatting for a MySQLAssetData error logging line
2009-10-06 02:38:00 -07:00