From a9ba9d4a9ee2515d2541fc536525ebed3d101606 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 15 Jul 2011 23:51:55 +0100
Subject: change async parameter name in AddLocalPacketHandler since it becomes
a reserved keyword in .net 5
Also adds some method doc.
---
.../Region/ClientStack/Linden/UDP/LLClientView.cs | 24 ++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region')
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
return result;
}
+ ///
+ /// Add a handler for the given packet type.
+ ///
+ /// The packet is handled on its own thread. If packets must be handled in the order in which thye
+ /// are received then please us ethe synchronous version of this method.
+ ///
+ ///
+ /// true if the handler was added. This is currently always the case.
public bool AddLocalPacketHandler(PacketType packetType, PacketMethod handler)
{
return AddLocalPacketHandler(packetType, handler, true);
}
- public bool AddLocalPacketHandler(PacketType packetType, PacketMethod handler, bool async)
+ ///
+ /// Add a handler for the given packet type.
+ ///
+ ///
+ ///
+ ///
+ /// If true, when the packet is received it is handled on its own thread rather than on the main inward bound
+ /// packet handler thread. This vastly increases respnosiveness but some packets need to be handled
+ /// synchronously.
+ ///
+ /// true if the handler was added. This is currently always the case.
+ public bool AddLocalPacketHandler(PacketType packetType, PacketMethod handler, bool doAsync)
{
bool result = false;
lock (m_packetHandlers)
{
if (!m_packetHandlers.ContainsKey(packetType))
{
- m_packetHandlers.Add(packetType, new PacketProcessor() { method = handler, Async = async });
+ m_packetHandlers.Add(packetType, new PacketProcessor() { method = handler, Async = doAsync });
result = true;
}
}
+
return result;
}
--
cgit v1.1