udp is not tcp. If mono versions have bronke udp sento, better update, also having 300 threads because object select is not funny

0.9.0-post-fixes
UbitUmarov 2017-06-13 12:17:39 +01:00
parent e650a4ff16
commit 3ba63dde6e
3 changed files with 27 additions and 5 deletions

View File

@ -6036,8 +6036,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
AddLocalPacketHandler(PacketType.ObjectExtraParams, HandleObjectExtraParams);
AddLocalPacketHandler(PacketType.ObjectDuplicate, HandleObjectDuplicate);
AddLocalPacketHandler(PacketType.RequestMultipleObjects, HandleRequestMultipleObjects);
AddLocalPacketHandler(PacketType.ObjectSelect, HandleObjectSelect);
AddLocalPacketHandler(PacketType.ObjectDeselect, HandleObjectDeselect);
AddLocalPacketHandler(PacketType.ObjectSelect, HandleObjectSelect, true, true);
AddLocalPacketHandler(PacketType.ObjectDeselect, HandleObjectDeselect, true, true);
AddLocalPacketHandler(PacketType.ObjectPosition, HandleObjectPosition);
AddLocalPacketHandler(PacketType.ObjectScale, HandleObjectScale);
AddLocalPacketHandler(PacketType.ObjectRotation, HandleObjectRotation);

View File

@ -1222,7 +1222,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
outgoingPacket.SequenceNumber, isReliable, isResend, udpClient.AgentID, Scene.Name);
// Put the UDP payload on the wire
AsyncBeginSend(buffer);
// AsyncBeginSend(buffer);
SyncSend(buffer);
// Keep track of when this packet was sent out (right now)
outgoingPacket.TickCount = Environment.TickCount & Int32.MaxValue;
@ -1907,7 +1908,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
Buffer.BlockCopy(packetData, 0, buffer.Data, 0, length);
AsyncBeginSend(buffer);
// AsyncBeginSend(buffer);
SyncSend(buffer);
}
protected bool IsClientAuthorized(UseCircuitCodePacket useCircuitCode, out AuthenticateResponse sessionInfo)

View File

@ -487,7 +487,7 @@ namespace OpenMetaverse
}
catch (SocketException) { }
catch (ObjectDisposedException) { }
// }
// }
}
void AsyncEndSend(IAsyncResult result)
@ -502,5 +502,25 @@ namespace OpenMetaverse
catch (SocketException) { }
catch (ObjectDisposedException) { }
}
public void SyncSend(UDPPacketBuffer buf)
{
try
{
m_udpSocket.SendTo(
buf.Data,
0,
buf.DataLength,
SocketFlags.None,
buf.RemoteEndPoint
);
UdpSends++;
}
catch (SocketException e)
{
m_log.Warn("[UDPBASE]: sync send SocketException {0} " + e.Message);
}
catch (ObjectDisposedException) { }
}
}
}