aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-10-12 19:22:30 +0100
committerJustin Clark-Casey (justincc)2011-10-12 19:22:30 +0100
commitf9ffd2538f3bf300e8f751258a6129fb780b5b0a (patch)
tree223fe9d64772149cc60e5f2398a815044857720b /OpenSim/Region/ClientStack
parentStart recording object updates per second statistic (analogue of agent update... (diff)
downloadopensim-SC-f9ffd2538f3bf300e8f751258a6129fb780b5b0a.zip
opensim-SC-f9ffd2538f3bf300e8f751258a6129fb780b5b0a.tar.gz
opensim-SC-f9ffd2538f3bf300e8f751258a6129fb780b5b0a.tar.bz2
opensim-SC-f9ffd2538f3bf300e8f751258a6129fb780b5b0a.tar.xz
Improve some method doc for LLUDPClient, LLUDPServer and UnackedPacketCollection
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs22
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs17
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs17
3 files changed, 39 insertions, 17 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs
index ca5501d..31cc515 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs
@@ -169,7 +169,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
169 /// <param name="circuitCode">Circuit code for this connection</param> 169 /// <param name="circuitCode">Circuit code for this connection</param>
170 /// <param name="agentID">AgentID for the connected agent</param> 170 /// <param name="agentID">AgentID for the connected agent</param>
171 /// <param name="remoteEndPoint">Remote endpoint for this connection</param> 171 /// <param name="remoteEndPoint">Remote endpoint for this connection</param>
172 public LLUDPClient(LLUDPServer server, ThrottleRates rates, TokenBucket parentThrottle, uint circuitCode, UUID agentID, IPEndPoint remoteEndPoint, int defaultRTO, int maxRTO) 172 /// <param name="defaultRTO">
173 /// Default retransmission timeout for unacked packets. The RTO will never drop
174 /// beyond this number.
175 /// </param>
176 /// <param name="maxRTO">
177 /// The maximum retransmission timeout for unacked packets. The RTO will never exceed this number.
178 /// </param>
179 public LLUDPClient(
180 LLUDPServer server, ThrottleRates rates, TokenBucket parentThrottle, uint circuitCode, UUID agentID,
181 IPEndPoint remoteEndPoint, int defaultRTO, int maxRTO)
173 { 182 {
174 AgentID = agentID; 183 AgentID = agentID;
175 RemoteEndPoint = remoteEndPoint; 184 RemoteEndPoint = remoteEndPoint;
@@ -197,7 +206,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
197 m_throttleCategories[i] = new TokenBucket(m_throttleCategory, rates.GetRate(type)); 206 m_throttleCategories[i] = new TokenBucket(m_throttleCategory, rates.GetRate(type));
198 } 207 }
199 208
200 // Default the retransmission timeout to three seconds 209 // Default the retransmission timeout to one second
201 RTO = m_defaultRTO; 210 RTO = m_defaultRTO;
202 211
203 // Initialize this to a sane value to prevent early disconnects 212 // Initialize this to a sane value to prevent early disconnects
@@ -262,9 +271,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
262 /// <summary> 271 /// <summary>
263 /// Return statistics information about client packet queues. 272 /// Return statistics information about client packet queues.
264 /// </summary> 273 /// </summary>
265 /// 274 /// <remarks>
266 /// FIXME: This should really be done in a more sensible manner rather than sending back a formatted string. 275 /// FIXME: This should really be done in a more sensible manner rather than sending back a formatted string.
267 /// 276 /// </remarks>
268 /// <returns></returns> 277 /// <returns></returns>
269 public string GetStats() 278 public string GetStats()
270 { 279 {
@@ -606,8 +615,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
606 /// Does an early check to see if this queue empty callback is already 615 /// Does an early check to see if this queue empty callback is already
607 /// running, then asynchronously firing the event 616 /// running, then asynchronously firing the event
608 /// </summary> 617 /// </summary>
609 /// <param name="throttleIndex">Throttle category to fire the callback 618 /// <param name="categories">Throttle categories to fire the callback for</param>
610 /// for</param>
611 private void BeginFireQueueEmpty(ThrottleOutPacketTypeFlags categories) 619 private void BeginFireQueueEmpty(ThrottleOutPacketTypeFlags categories)
612 { 620 {
613 if (m_nextOnQueueEmpty != 0 && (Environment.TickCount & Int32.MaxValue) >= m_nextOnQueueEmpty) 621 if (m_nextOnQueueEmpty != 0 && (Environment.TickCount & Int32.MaxValue) >= m_nextOnQueueEmpty)
@@ -694,4 +702,4 @@ namespace OpenSim.Region.ClientStack.LindenUDP
694 } 702 }
695 } 703 }
696 } 704 }
697} 705} \ No newline at end of file
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index 304efe6..ccad241 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -324,7 +324,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
324 /// <param name="packet"></param> 324 /// <param name="packet"></param>
325 /// <param name="category"></param> 325 /// <param name="category"></param>
326 /// <param name="allowSplitting"></param> 326 /// <param name="allowSplitting"></param>
327 public void SendPacket(LLUDPClient udpClient, Packet packet, ThrottleOutPacketType category, bool allowSplitting, UnackedPacketMethod method) 327 /// <param name="method">
328 /// The method to call if the packet is not acked by the client. If null, then a standard
329 /// resend of the packet is done.
330 /// </param>
331 public void SendPacket(
332 LLUDPClient udpClient, Packet packet, ThrottleOutPacketType category, bool allowSplitting, UnackedPacketMethod method)
328 { 333 {
329 // CoarseLocationUpdate packets cannot be split in an automated way 334 // CoarseLocationUpdate packets cannot be split in an automated way
330 if (packet.Type == PacketType.CoarseLocationUpdate && allowSplitting) 335 if (packet.Type == PacketType.CoarseLocationUpdate && allowSplitting)
@@ -357,8 +362,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
357 /// <param name="udpClient"></param> 362 /// <param name="udpClient"></param>
358 /// <param name="data"></param> 363 /// <param name="data"></param>
359 /// <param name="type"></param> 364 /// <param name="type"></param>
360 /// <param name="category"></param> 365 /// <param name="category"></param>
361 public void SendPacketData(LLUDPClient udpClient, byte[] data, PacketType type, ThrottleOutPacketType category, UnackedPacketMethod method) 366 /// <param name="method">
367 /// The method to call if the packet is not acked by the client. If null, then a standard
368 /// resend of the packet is done.
369 /// </param>
370 public void SendPacketData(
371 LLUDPClient udpClient, byte[] data, PacketType type, ThrottleOutPacketType category, UnackedPacketMethod method)
362 { 372 {
363 int dataLength = data.Length; 373 int dataLength = data.Length;
364 bool doZerocode = (data[0] & Helpers.MSG_ZEROCODED) != 0; 374 bool doZerocode = (data[0] & Helpers.MSG_ZEROCODED) != 0;
@@ -1100,7 +1110,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1100 { 1110 {
1101 m_log.Error("[LLUDPSERVER]: OutgoingPacketHandler loop threw an exception: " + ex.Message, ex); 1111 m_log.Error("[LLUDPSERVER]: OutgoingPacketHandler loop threw an exception: " + ex.Message, ex);
1102 } 1112 }
1103
1104 } 1113 }
1105 1114
1106 Watchdog.RemoveThread(); 1115 Watchdog.RemoveThread();
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs b/OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs
index 793aefe..6b1d7d2 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs
@@ -118,12 +118,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
118 /// Returns a list of all of the packets with a TickCount older than 118 /// Returns a list of all of the packets with a TickCount older than
119 /// the specified timeout 119 /// the specified timeout
120 /// </summary> 120 /// </summary>
121 /// <remarks>
122 /// This function is not thread safe, and cannot be called
123 /// multiple times concurrently
124 /// </remarks>
121 /// <param name="timeoutMS">Number of ticks (milliseconds) before a 125 /// <param name="timeoutMS">Number of ticks (milliseconds) before a
122 /// packet is considered expired</param> 126 /// packet is considered expired
123 /// <returns>A list of all expired packets according to the given 127 /// </param>
124 /// expiration timeout</returns> 128 /// <returns>
125 /// <remarks>This function is not thread safe, and cannot be called 129 /// A list of all expired packets according to the given
126 /// multiple times concurrently</remarks> 130 /// expiration timeout
131 /// </returns>
127 public List<OutgoingPacket> GetExpiredPackets(int timeoutMS) 132 public List<OutgoingPacket> GetExpiredPackets(int timeoutMS)
128 { 133 {
129 ProcessQueues(); 134 ProcessQueues();
@@ -216,4 +221,4 @@ namespace OpenSim.Region.ClientStack.LindenUDP
216 } 221 }
217 } 222 }
218 } 223 }
219} 224} \ No newline at end of file