aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2017-06-13 12:17:39 +0100
committerUbitUmarov2017-06-13 12:17:39 +0100
commit3ba63dde6ef773602a6c8ffa11d034a59a73f057 (patch)
tree28df9098c6261ed92912c4a0dcbcb7c33395d94a /OpenSim/Region
parent remove excessive notion of paralelism (diff)
downloadopensim-SC_OLD-3ba63dde6ef773602a6c8ffa11d034a59a73f057.zip
opensim-SC_OLD-3ba63dde6ef773602a6c8ffa11d034a59a73f057.tar.gz
opensim-SC_OLD-3ba63dde6ef773602a6c8ffa11d034a59a73f057.tar.bz2
opensim-SC_OLD-3ba63dde6ef773602a6c8ffa11d034a59a73f057.tar.xz
udp is not tcp. If mono versions have bronke udp sento, better update, also having 300 threads because object select is not funny
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs4
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs6
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs22
3 files changed, 27 insertions, 5 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 1091078..f13b259 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -6036,8 +6036,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6036 AddLocalPacketHandler(PacketType.ObjectExtraParams, HandleObjectExtraParams); 6036 AddLocalPacketHandler(PacketType.ObjectExtraParams, HandleObjectExtraParams);
6037 AddLocalPacketHandler(PacketType.ObjectDuplicate, HandleObjectDuplicate); 6037 AddLocalPacketHandler(PacketType.ObjectDuplicate, HandleObjectDuplicate);
6038 AddLocalPacketHandler(PacketType.RequestMultipleObjects, HandleRequestMultipleObjects); 6038 AddLocalPacketHandler(PacketType.RequestMultipleObjects, HandleRequestMultipleObjects);
6039 AddLocalPacketHandler(PacketType.ObjectSelect, HandleObjectSelect); 6039 AddLocalPacketHandler(PacketType.ObjectSelect, HandleObjectSelect, true, true);
6040 AddLocalPacketHandler(PacketType.ObjectDeselect, HandleObjectDeselect); 6040 AddLocalPacketHandler(PacketType.ObjectDeselect, HandleObjectDeselect, true, true);
6041 AddLocalPacketHandler(PacketType.ObjectPosition, HandleObjectPosition); 6041 AddLocalPacketHandler(PacketType.ObjectPosition, HandleObjectPosition);
6042 AddLocalPacketHandler(PacketType.ObjectScale, HandleObjectScale); 6042 AddLocalPacketHandler(PacketType.ObjectScale, HandleObjectScale);
6043 AddLocalPacketHandler(PacketType.ObjectRotation, HandleObjectRotation); 6043 AddLocalPacketHandler(PacketType.ObjectRotation, HandleObjectRotation);
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index 9aa1845..171e1cf 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -1222,7 +1222,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1222 outgoingPacket.SequenceNumber, isReliable, isResend, udpClient.AgentID, Scene.Name); 1222 outgoingPacket.SequenceNumber, isReliable, isResend, udpClient.AgentID, Scene.Name);
1223 1223
1224 // Put the UDP payload on the wire 1224 // Put the UDP payload on the wire
1225 AsyncBeginSend(buffer); 1225// AsyncBeginSend(buffer);
1226 SyncSend(buffer);
1226 1227
1227 // Keep track of when this packet was sent out (right now) 1228 // Keep track of when this packet was sent out (right now)
1228 outgoingPacket.TickCount = Environment.TickCount & Int32.MaxValue; 1229 outgoingPacket.TickCount = Environment.TickCount & Int32.MaxValue;
@@ -1907,7 +1908,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1907 1908
1908 Buffer.BlockCopy(packetData, 0, buffer.Data, 0, length); 1909 Buffer.BlockCopy(packetData, 0, buffer.Data, 0, length);
1909 1910
1910 AsyncBeginSend(buffer); 1911// AsyncBeginSend(buffer);
1912 SyncSend(buffer);
1911 } 1913 }
1912 1914
1913 protected bool IsClientAuthorized(UseCircuitCodePacket useCircuitCode, out AuthenticateResponse sessionInfo) 1915 protected bool IsClientAuthorized(UseCircuitCodePacket useCircuitCode, out AuthenticateResponse sessionInfo)
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs
index c360f43..8dd96d6 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs
@@ -487,7 +487,7 @@ namespace OpenMetaverse
487 } 487 }
488 catch (SocketException) { } 488 catch (SocketException) { }
489 catch (ObjectDisposedException) { } 489 catch (ObjectDisposedException) { }
490// } 490 // }
491 } 491 }
492 492
493 void AsyncEndSend(IAsyncResult result) 493 void AsyncEndSend(IAsyncResult result)
@@ -502,5 +502,25 @@ namespace OpenMetaverse
502 catch (SocketException) { } 502 catch (SocketException) { }
503 catch (ObjectDisposedException) { } 503 catch (ObjectDisposedException) { }
504 } 504 }
505
506 public void SyncSend(UDPPacketBuffer buf)
507 {
508 try
509 {
510 m_udpSocket.SendTo(
511 buf.Data,
512 0,
513 buf.DataLength,
514 SocketFlags.None,
515 buf.RemoteEndPoint
516 );
517 UdpSends++;
518 }
519 catch (SocketException e)
520 {
521 m_log.Warn("[UDPBASE]: sync send SocketException {0} " + e.Message);
522 }
523 catch (ObjectDisposedException) { }
524 }
505 } 525 }
506} 526}