aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-07-08Attempt to render "[LLUDPSERVER]: Malformed data, cannot parse" into ↵onefang1-2/+5
something human readable as an aid to diagnosis. Beats hand translating the big block of hex codes it was spewing.
2019-05-19Dump OpenSim 0.9.0.1 into it's own branch.onefang1-397/+381
2016-11-03Initial update to OpenSim 0.8.2.1 source code.David Walter Seikel1-274/+700
2012-11-16Add a first draft mechanism for the IncomingPacketsProcessedStat to show the ↵Justin Clark-Casey (justincc)1-0/+1
delta over time. The chief motivation for this is to be able to tell whether there's any impact on incoming packet processing from enabling extra packet pooling.
2012-11-15Make PacketPool class stats pull stats instead of push stats so they can be ↵Justin Clark-Casey (justincc)1-0/+54
lifted up into LLUDPServer and be distiguished by scene name
2012-11-15Add IncomingPacketsProcessedCount stat for diagnostics.Justin Clark-Casey (justincc)1-14/+89
Also puts some packet processing counts in a container named after the scene so that stats can be collected from more than one scene.
2012-10-23Make it possible to turn the base UDP object packet pools on and off whilst ↵Justin Clark-Casey (justincc)1-17/+86
running via the "debug lludp pool <on|off>" console command. For debug purposes. This does not currently apply to the higher LLUDP packetpool.
2012-10-23Add object count stats for new IncomingPacket and UDPPacketBuffer pools if ↵Justin Clark-Casey (justincc)1-0/+14
they are enabled. Add count stats for existing LLUDP pool. This introduces a pull stat type in addition to the push stat type. A pull stat takes a method on construction which knows how to update the stat on request. In this way, special interfaces for pull stat collection are not necessary.
2012-10-17Explicitly return only the incoming AgentUpdate packet as this is the only ↵Justin Clark-Casey (justincc)1-2/+15
one we pool atm, rather than attempting to return all incoming packets.
2012-10-17If RecycleBaseUDPPackets = true, also pool IncomingPackets to reduce memory ↵Justin Clark-Casey (justincc)1-1/+24
churn
2012-10-16Add optional pool for the UDPPacketBuffer objects that handle all incoming ↵Justin Clark-Casey (justincc)1-18/+24
UDP data. Even when an avatar is standing still, it's sending in a constant stream of AgentUpdate packets that the client creates new UDPPacketBuffer objects to handle. This option pools those objects. This reduces memory churn. Currently off by default. Works but the scope can be expanded.
2012-10-16Make it possible to separate start and stop lludp packet processing from the ↵Justin Clark-Casey (justincc)1-14/+102
console for debug processes. This is controlled via the "debug lludp start <in|out|all>" and "debug lludp stop <in|out|all>" region console commands. The command "debug lludp status" will show current status.
2012-10-12Add AgentUpdate to PacketPool. This is the most common inbound packet from ↵Justin Clark-Casey (justincc)1-2/+19
viewers.
2012-10-11Fix packetpool for ImprovedTerseObjectUpdate packets.Justin Clark-Casey (justincc)1-0/+2
These were neither being returned or in many places reused. Getting packets from a pool rather than deallocating and reallocating reduces memory churn which in turn reduces garbage collection time and frequency.
2012-10-10Lock on AgentCircuitData during Scene.AddClient() and RemoveClient() to ↵Justin Clark-Casey (justincc)1-7/+7
prevent an inactive connection being left behind if the user closes the viewer whilst the connection is being established. This should remove the need to run the console command "kick user --force" when these connections are left around.
2012-10-05Read PacketPool config in LLUDPServer with other config params rather than ↵Justin Clark-Casey (justincc)1-0/+9
in Scene. This is to resolve previous build break. This unnecessarily but harmlessly reads and sets the parameter multiple times - scene was doing the same thing.
2012-07-25Rename OpenSim.Framework.Statistics to OpenSim.Framework.Monitoring.Justin Clark-Casey (justincc)1-1/+1
This better reflects the long-term purpose of that project and matches Monitoring modules.
2012-07-19Prevent race conditions between two threads that call LLClientView.Close() ↵Justin Clark-Casey (justincc)1-15/+14
simultaneously (e.g. ack timeout and an attempt to reconnect)
2012-07-12Stop redundantly passing in the endpoint to the LLClientView constructor.Justin Clark-Casey (justincc)1-1/+1
This can always be retrieved via the LLUDPClient and is so done in various places already.
2012-07-04refactor: rename Watchdog.WATCHDOG_TIMEOUT_MS to DEFAULT_WATCHDOG_TIMEOUT_MS ↵Justin Clark-Casey (justincc)1-2/+2
to reflect what it actually is
2012-06-15Add region name to UseCircuitCode log messagesJustin Clark-Casey (justincc)1-4/+4
2012-06-12Remove accidental timeout left in during earlier debugging. Has been in ↵Justin Clark-Casey (justincc)1-1/+1
since two commits ago (b099f26)
2012-06-12Set IClientAPI.IsActive = false early on client removal due to ack timeout ↵Justin Clark-Casey (justincc)1-29/+35
rather than using IsLoggingOut flag. IsActive is more appropriate since unack timeout is not due to voluntary logout. This is in line with operations such as manual kick that do not set the IsLoggingOut flag. It's also slightly better race-wise since it reduces the chance of this operation clashing with another reason for client deactivation (e.g. manual kick).
2012-06-12If the simulator closes a root agent due to ack timeout, then send the ↵Justin Clark-Casey (justincc)1-2/+20
client a kick message with that reason, in case it is somehow still listening.
2012-06-08Instead of retrieving the known client again in LLUDPServer.RemoveClient(), ↵Justin Clark-Casey (justincc)1-21/+10
check the IsLoggingOut flag instead. This is slightly better thread-race wise
2012-06-08If logging a client out due to ack timeout, do this asynchronously rather ↵Justin Clark-Casey (justincc)1-8/+18
than synchronously on the outgoing packet loop. This is the same async behaviour as normal logouts. This is necessary because the event queue will sleep the thread for 5 seconds on an ack timeout logout as the client isn't around to pick up the final event queue messages.
2012-06-08Add regression test for client logout due to ack timeout.Justin Clark-Casey (justincc)1-4/+6
2012-06-08Remove null checks at top of LLUDPServer.ProcessInPacket(). Neither packet ↵Justin Clark-Casey (justincc)1-8/+1
nor client are ever null.
2012-06-08Store already retrieve IClientAPI in IncomingPacket structure for later use ↵Justin Clark-Casey (justincc)1-13/+13
rather than doing another retrieve on dequeue. Instead of checking whether the client still exists by trying to retrieve again from the client manager, this patch gets it back from IncomingPacket and checks the IClientAPI.IsActive state.
2012-06-07Log warning if we try to remove a UDP client that has already been removed.Justin Clark-Casey (justincc)1-0/+6
2012-06-07Allow the thread watchdog to accept an alarm method that is invoked if the ↵Justin Clark-Casey (justincc)1-5/+64
timeout is breached. This alarm can then invoke this to log extra information. This is used in LLUDPServer to show which client was being processed when incoming and outgoing udp watchdog alarms are triggered.
2012-06-05Mantis 4597 AgentPaused packet is ignored.Talun1-3/+15
The packet was actually being handled but not acted on. This change extends the default timeout for paused clients to 5 minutes and makes both the paused and non-paused timeout periods configurable.
2012-04-26Tweak log messages on local region to region teleport path to help with ↵Justin Clark-Casey (justincc)1-1/+3
problem resolution.
2012-04-26minor: Add region name to dropped inbound packet messageJustin Clark-Casey (justincc)1-1/+3
2012-02-24Stop spurious scene loop startup timeout alarms for scenes with many prims.Justin Clark-Casey (justincc)1-2/+5
On the first frame, all startup scene objects are added to the physics scene. This can cause a considerable delay, so we don't start raising the alarm on scene loop timeouts until the second frame. This commit also slightly changes the behaviour of timeout reporting. Previously, a report was made for the very first timed out thread, ignoring all others until the next watchdog check. Instead, we now report every timed out thread, though we still only do this once no matter how long the timeout.
2012-02-16Correct a bug introduced in 1f402fdf (Feb 7 2012) where the delete friends ↵Justin Clark-Casey (justincc)1-3/+3
grid call would try and contact the wrong uri. Also fixes the build from df960d5
2012-02-16Add known identity informatio nto log message if an exception is thrown ↵Justin Clark-Casey (justincc)1-36/+53
during LLUDPServer.HandleUseCircuitCode()
2012-01-24Fix "Abnormal client thread terminations" stat in period CONNECTION ↵Justin Clark-Casey (justincc)1-0/+1
STATISTICS to count the number of times clients are disconnected due to ack timeouts. This has been broken for a long period and would only ever show 0.
2011-12-08Don't reply with an ack packet if the client is not authorized.Justin Clark-Casey (justincc)1-42/+29
2011-12-08Extend TestAddClient() to check that the first packet received is an ack packetJustin Clark-Casey (justincc)1-1/+15
2011-12-08Reactivate BasicCircuitTests.TestAddClient()Justin Clark-Casey (justincc)1-1/+19
This checks that the initial UseCircuitCode packet is handled correctly for a normal client login.
2011-12-08Remove unnecessary AgentCircuitData null check from Scene.AddNewClient().Justin Clark-Casey (justincc)1-4/+4
The only caller is the LLUDP stack and this has to validate the UDP circuit itself, so we know that it exists. This allows us to eliminate another null check elsewhere and simplifies the method contract
2011-12-08On a new client circuit, send the initial reply ack to let the client know ↵Justin Clark-Casey (justincc)1-19/+39
it's live before sending other data. This means that avatar/appearance data of other avatars and scene objects for a client will be sent after the ack rather than possibly before. This may stop some avatars appearing grey on login. This introduces a new OpenSim.Framework.ISceneAgent to accompany the existing OpenSim.Framework.ISceneObject and ISceneEntity This allows IClientAPI to handle this as it can't reference OpenSim.Region.Framework.Interfaces
2011-10-12Improve some method doc for LLUDPClient, LLUDPServer and UnackedPacketCollectionJustin Clark-Casey (justincc)1-4/+13
2011-10-03Remove vestigal RegionStatus.SlaveScene.Justin Clark-Casey (justincc)1-15/+7
This appears to be code clutter since the code that uses this has long gone.
2011-07-27Ensure that packet headers get parsed correctlyMelanie1-0/+29
2011-04-30First stab at cleaning up Caps. Compiles. Untested.Diva Canto1-0/+0
2011-04-21Refactor UnackedPacketCollection so ProcessQueues will handle Adds, Acks, ↵Dan Lake1-2/+2
and Removes in that order.
2011-04-20bug fix. Now when an unacked update packet is handled through ↵Dan Lake1-2/+2
ResendPrimUpdates, it is removed from the UnackedPacketCollection.
2011-04-19Requeue unacknowledged entity updates rather than resend then "as is".Dan Lake1-32/+32
Often, by the time the UDPServer realizes that an entity update packet has not been acknowledged, there is a newer update for the same entity already queued up or there is a higher priority update that should be sent first. This patch eliminates 1:1 packet resends for unacked entity update packets. Insteawd, unacked update packets are decomposed into the original entity updates and those updates are placed back into the priority queues based on their new priority but the original update timestamp. This will generally place them at the head of the line to be put back on the wire as a new outgoing packet but prevents the resend queue from filling up with multiple stale updates for the same entity. This new approach takes advantage of the UDP nature of the Linden protocol in that the intent of a reliable update packet is that if it goes unacknowledge, SOMETHING has to happen to get the update to the client. We are simply making sure that we are resending current object state rather than stale object state. Additionally, this patch includes a generalized callback mechanism so that any caller can specify their own method to call when a packet expires without being acknowledged. We use this mechanism to requeue update packets and otherwise use the UDPServer default method of just putting expired packets in the resend queue.