aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs24
1 files changed, 22 insertions, 2 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index c176c2b..8414f8b 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -574,22 +574,42 @@ namespace OpenSim.Region.ClientStack.LindenUDP
574 return result; 574 return result;
575 } 575 }
576 576
577 /// <summary>
578 /// Add a handler for the given packet type.
579 /// </summary>
580 /// <remarks>The packet is handled on its own thread. If packets must be handled in the order in which thye
581 /// are received then please us ethe synchronous version of this method.</remarks>
582 /// <param name="packetType"></param>
583 /// <param name="handler"></param>
584 /// <returns>true if the handler was added. This is currently always the case.</returns>
577 public bool AddLocalPacketHandler(PacketType packetType, PacketMethod handler) 585 public bool AddLocalPacketHandler(PacketType packetType, PacketMethod handler)
578 { 586 {
579 return AddLocalPacketHandler(packetType, handler, true); 587 return AddLocalPacketHandler(packetType, handler, true);
580 } 588 }
581 589
582 public bool AddLocalPacketHandler(PacketType packetType, PacketMethod handler, bool async) 590 /// <summary>
591 /// Add a handler for the given packet type.
592 /// </summary>
593 /// <param name="packetType"></param>
594 /// <param name="handler"></param>
595 /// <param name="doAsync">
596 /// If true, when the packet is received it is handled on its own thread rather than on the main inward bound
597 /// packet handler thread. This vastly increases respnosiveness but some packets need to be handled
598 /// synchronously.
599 /// </param>
600 /// <returns>true if the handler was added. This is currently always the case.</returns>
601 public bool AddLocalPacketHandler(PacketType packetType, PacketMethod handler, bool doAsync)
583 { 602 {
584 bool result = false; 603 bool result = false;
585 lock (m_packetHandlers) 604 lock (m_packetHandlers)
586 { 605 {
587 if (!m_packetHandlers.ContainsKey(packetType)) 606 if (!m_packetHandlers.ContainsKey(packetType))
588 { 607 {
589 m_packetHandlers.Add(packetType, new PacketProcessor() { method = handler, Async = async }); 608 m_packetHandlers.Add(packetType, new PacketProcessor() { method = handler, Async = doAsync });
590 result = true; 609 result = true;
591 } 610 }
592 } 611 }
612
593 return result; 613 return result;
594 } 614 }
595 615