aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-07-15 23:51:55 +0100
committerJustin Clark-Casey (justincc)2011-07-15 23:51:55 +0100
commita9ba9d4a9ee2515d2541fc536525ebed3d101606 (patch)
tree1f4ebd187d51a8af80345baa469e0abd3d4972f4 /OpenSim
parentIf object is an attachment, make llGetVel() return the avatar's speed rather ... (diff)
downloadopensim-SC_OLD-a9ba9d4a9ee2515d2541fc536525ebed3d101606.zip
opensim-SC_OLD-a9ba9d4a9ee2515d2541fc536525ebed3d101606.tar.gz
opensim-SC_OLD-a9ba9d4a9ee2515d2541fc536525ebed3d101606.tar.bz2
opensim-SC_OLD-a9ba9d4a9ee2515d2541fc536525ebed3d101606.tar.xz
change async parameter name in AddLocalPacketHandler since it becomes a reserved keyword in .net 5
Also adds some method doc.
Diffstat (limited to 'OpenSim')
-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