aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2011-10-25 01:35:30 +0100
committerMelanie2011-10-25 01:35:30 +0100
commit080a41e9f9e750530b09bde227eacdfef89e3ed4 (patch)
tree093911d8440d4b012b4bdba0dbd220bfc96f902d /OpenSim
parentFix ground sit autopilot (diff)
parentImprove some method doc for LLUDPClient, LLUDPServer and UnackedPacketCollection (diff)
downloadopensim-SC-080a41e9f9e750530b09bde227eacdfef89e3ed4.zip
opensim-SC-080a41e9f9e750530b09bde227eacdfef89e3ed4.tar.gz
opensim-SC-080a41e9f9e750530b09bde227eacdfef89e3ed4.tar.bz2
opensim-SC-080a41e9f9e750530b09bde227eacdfef89e3ed4.tar.xz
Merge commit 'f9ffd2538f3bf300e8f751258a6129fb780b5b0a' into bigmerge
Diffstat (limited to 'OpenSim')
-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 758fd93..3802482 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs
@@ -170,7 +170,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
170 /// <param name="circuitCode">Circuit code for this connection</param> 170 /// <param name="circuitCode">Circuit code for this connection</param>
171 /// <param name="agentID">AgentID for the connected agent</param> 171 /// <param name="agentID">AgentID for the connected agent</param>
172 /// <param name="remoteEndPoint">Remote endpoint for this connection</param> 172 /// <param name="remoteEndPoint">Remote endpoint for this connection</param>
173 public LLUDPClient(LLUDPServer server, ThrottleRates rates, TokenBucket parentThrottle, uint circuitCode, UUID agentID, IPEndPoint remoteEndPoint, int defaultRTO, int maxRTO) 173 /// <param name="defaultRTO">
174 /// Default retransmission timeout for unacked packets. The RTO will never drop
175 /// beyond this number.
176 /// </param>
177 /// <param name="maxRTO">
178 /// The maximum retransmission timeout for unacked packets. The RTO will never exceed this number.
179 /// </param>
180 public LLUDPClient(
181 LLUDPServer server, ThrottleRates rates, TokenBucket parentThrottle, uint circuitCode, UUID agentID,
182 IPEndPoint remoteEndPoint, int defaultRTO, int maxRTO)
174 { 183 {
175 AgentID = agentID; 184 AgentID = agentID;
176 RemoteEndPoint = remoteEndPoint; 185 RemoteEndPoint = remoteEndPoint;
@@ -198,7 +207,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
198 m_throttleCategories[i] = new TokenBucket(m_throttleCategory, rates.GetRate(type)); 207 m_throttleCategories[i] = new TokenBucket(m_throttleCategory, rates.GetRate(type));
199 } 208 }
200 209
201 // Default the retransmission timeout to three seconds 210 // Default the retransmission timeout to one second
202 RTO = m_defaultRTO; 211 RTO = m_defaultRTO;
203 212
204 // Initialize this to a sane value to prevent early disconnects 213 // Initialize this to a sane value to prevent early disconnects
@@ -263,9 +272,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
263 /// <summary> 272 /// <summary>
264 /// Return statistics information about client packet queues. 273 /// Return statistics information about client packet queues.
265 /// </summary> 274 /// </summary>
266 /// 275 /// <remarks>
267 /// FIXME: This should really be done in a more sensible manner rather than sending back a formatted string. 276 /// FIXME: This should really be done in a more sensible manner rather than sending back a formatted string.
268 /// 277 /// </remarks>
269 /// <returns></returns> 278 /// <returns></returns>
270 public string GetStats() 279 public string GetStats()
271 { 280 {
@@ -616,8 +625,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
616 /// Does an early check to see if this queue empty callback is already 625 /// Does an early check to see if this queue empty callback is already
617 /// running, then asynchronously firing the event 626 /// running, then asynchronously firing the event
618 /// </summary> 627 /// </summary>
619 /// <param name="throttleIndex">Throttle category to fire the callback 628 /// <param name="categories">Throttle categories to fire the callback for</param>
620 /// for</param>
621 private void BeginFireQueueEmpty(ThrottleOutPacketTypeFlags categories) 629 private void BeginFireQueueEmpty(ThrottleOutPacketTypeFlags categories)
622 { 630 {
623 if (m_nextOnQueueEmpty != 0 && (Environment.TickCount & Int32.MaxValue) >= m_nextOnQueueEmpty) 631 if (m_nextOnQueueEmpty != 0 && (Environment.TickCount & Int32.MaxValue) >= m_nextOnQueueEmpty)
@@ -704,4 +712,4 @@ namespace OpenSim.Region.ClientStack.LindenUDP
704 } 712 }
705 } 713 }
706 } 714 }
707} 715} \ 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 d5b061b..ae8251a 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;
@@ -1102,7 +1112,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1102 { 1112 {
1103 m_log.Error("[LLUDPSERVER]: OutgoingPacketHandler loop threw an exception: " + ex.Message, ex); 1113 m_log.Error("[LLUDPSERVER]: OutgoingPacketHandler loop threw an exception: " + ex.Message, ex);
1104 } 1114 }
1105
1106 } 1115 }
1107 1116
1108 Watchdog.RemoveThread(); 1117 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