aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs19
1 files changed, 3 insertions, 16 deletions
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 }