aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs9
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs19
2 files changed, 5 insertions, 23 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index ec51e28..9aa1845 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -312,9 +312,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
312 /// stack. Use zero to leave this value as the default</summary> 312 /// stack. Use zero to leave this value as the default</summary>
313 protected int m_recvBufferSize; 313 protected int m_recvBufferSize;
314 314
315 /// <summary>Flag to process packets asynchronously or synchronously</summary>
316 protected bool m_asyncPacketHandling;
317
318 /// <summary>Tracks whether or not a packet was sent each round so we know 315 /// <summary>Tracks whether or not a packet was sent each round so we know
319 /// whether or not to sleep</summary> 316 /// whether or not to sleep</summary>
320 protected bool m_packetSent; 317 protected bool m_packetSent;
@@ -473,7 +470,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
473 IConfig config = configSource.Configs["ClientStack.LindenUDP"]; 470 IConfig config = configSource.Configs["ClientStack.LindenUDP"];
474 if (config != null) 471 if (config != null)
475 { 472 {
476 m_asyncPacketHandling = config.GetBoolean("async_packet_handling", true);
477 m_recvBufferSize = config.GetInt("client_socket_rcvbuf_size", 0); 473 m_recvBufferSize = config.GetInt("client_socket_rcvbuf_size", 0);
478 sceneThrottleBps = config.GetInt("scene_throttle_max_bps", 0); 474 sceneThrottleBps = config.GetInt("scene_throttle_max_bps", 0);
479 475
@@ -540,10 +536,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
540 public void StartInbound() 536 public void StartInbound()
541 { 537 {
542 m_log.InfoFormat( 538 m_log.InfoFormat(
543 "[LLUDPSERVER]: Starting inbound packet processing for the LLUDP server in {0} mode with UsePools = {1}", 539 "[LLUDPSERVER]: Starting inbound packet processing for the LLUDP server");
544 m_asyncPacketHandling ? "asynchronous" : "synchronous", UsePools);
545 540
546 base.StartInbound(m_recvBufferSize, m_asyncPacketHandling); 541 base.StartInbound(m_recvBufferSize);
547 542
548 // This thread will process the packets received that are placed on the packetInbox 543 // This thread will process the packets received that are placed on the packetInbox
549 WorkManager.StartThread( 544 WorkManager.StartThread(
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs
index 35a0711..c360f43 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs
@@ -57,9 +57,6 @@ namespace OpenMetaverse
57 /// <summary>UDP socket, used in either client or server mode</summary> 57 /// <summary>UDP socket, used in either client or server mode</summary>
58 private Socket m_udpSocket; 58 private Socket m_udpSocket;
59 59
60 /// <summary>Flag to process packets asynchronously or synchronously</summary>
61 private bool m_asyncPacketHandling;
62
63 /// <summary> 60 /// <summary>
64 /// Are we to use object pool(s) to reduce memory churn when receiving data? 61 /// Are we to use object pool(s) to reduce memory churn when receiving data?
65 /// </summary> 62 /// </summary>
@@ -205,10 +202,8 @@ namespace OpenMetaverse
205 /// manner (not throwing an exception when the remote side resets the 202 /// manner (not throwing an exception when the remote side resets the
206 /// connection). This call is ignored on Mono where the flag is not 203 /// connection). This call is ignored on Mono where the flag is not
207 /// necessary</remarks> 204 /// necessary</remarks>
208 public virtual void StartInbound(int recvBufferSize, bool asyncPacketHandling) 205 public virtual void StartInbound(int recvBufferSize)
209 { 206 {
210 m_asyncPacketHandling = asyncPacketHandling;
211
212 if (!IsRunningInbound) 207 if (!IsRunningInbound)
213 { 208 {
214 m_log.DebugFormat("[UDPBASE]: Starting inbound UDP loop"); 209 m_log.DebugFormat("[UDPBASE]: Starting inbound UDP loop");
@@ -407,12 +402,7 @@ namespace OpenMetaverse
407 if (IsRunningInbound) 402 if (IsRunningInbound)
408 { 403 {
409 UdpReceives++; 404 UdpReceives++;
410 405
411 // Asynchronous mode will start another receive before the
412 // callback for this packet is even fired. Very parallel :-)
413 if (m_asyncPacketHandling)
414 AsyncBeginReceive();
415
416 try 406 try
417 { 407 {
418 // get the buffer that was created in AsyncBeginReceive 408 // get the buffer that was created in AsyncBeginReceive
@@ -469,10 +459,7 @@ namespace OpenMetaverse
469// if (UsePools) 459// if (UsePools)
470// Pool.ReturnObject(buffer); 460// Pool.ReturnObject(buffer);
471 461
472 // Synchronous mode waits until the packet callback completes 462 AsyncBeginReceive();
473 // before starting the receive to fetch another packet
474 if (!m_asyncPacketHandling)
475 AsyncBeginReceive();
476 } 463 }
477 } 464 }
478 } 465 }