Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Open Simulator Technical Help
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
OpenSimulator Internals/Code Map/LLUDPServer
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Threading Model == LLUDPServer runs three persistent threads per region: {| class="wikitable" |- ! Thread !! Started by !! Purpose |- | Inbound receive thread || <code>StartInbound()</code> via base class <code>OpenSimUDPBase</code> || Receives raw UDP datagrams from the OS socket and places them on <code>packetInbox</code>. |- | <code>IncomingPacketHandler</code> || <code>StartInbound()</code> || Drains <code>packetInbox</code>, dispatches packets to the correct <code>LLClientView</code> via <code>ProcessInPacket()</code>. |- | <code>OutgoingPacketHandler</code> || <code>StartOutbound()</code> || Drives per-client outbound queues, resends, ACKs, and pings on a timer loop. |} A fourth engine, <code>OqrEngine</code> (Outgoing Queue Refill Engine), runs as a <code>JobEngine</code> thread pool to refill per-client outbound queues without blocking the outgoing packet handler. === Inbound path === OS socket β base class receive thread (OpenSimUDPBase) β PacketReceived() β decode + zerodecode β pending cache check (UseCircuitCode handling) β client lookup by endpoint β ACK processing (appended ACKs, PacketAck packets) β duplicate detection (PacketArchive) β packetInbox.Add() β IncomingPacketHandler thread β LLClientView.ProcessInPacket() UseCircuitCode packets are handled specially: they are dispatched via <code>FireAndForget</code> to <code>HandleUseCircuitCode()</code>, which authenticates the circuit, creates a new <code>LLClientView</code> and <code>LLUDPClient</code>, and then reinjects any packets that arrived while the client was being set up (held in a per-endpoint pending queue). === Outbound path === Scene code / region modules β LLClientView.SendXxx() β LLUDPServer.SendPacket() / SendPacketData() / SendUDPPacket() β optional zerocoding β OutgoingPacket constructed β LLUDPClient.EnqueueOutgoing() if queue full or not throttled: β SendPacketFinal() β SyncSend() β OS socket else: β sits in per-client priority queue β OutgoingPacketHandler β DequeueOutgoing() β SendPacketFinal() ----
Summary:
Please note that all contributions to Open Simulator Technical Help may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Open Simulator Technical Help:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
OpenSimulator Internals/Code Map/LLUDPServer
(section)
Add topic