udp is not tcp. If mono versions have bronke udp sento, better update, also having 300 threads because object select is not funny
parent
e650a4ff16
commit
3ba63dde6e
|
@ -6036,8 +6036,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
AddLocalPacketHandler(PacketType.ObjectExtraParams, HandleObjectExtraParams);
|
AddLocalPacketHandler(PacketType.ObjectExtraParams, HandleObjectExtraParams);
|
||||||
AddLocalPacketHandler(PacketType.ObjectDuplicate, HandleObjectDuplicate);
|
AddLocalPacketHandler(PacketType.ObjectDuplicate, HandleObjectDuplicate);
|
||||||
AddLocalPacketHandler(PacketType.RequestMultipleObjects, HandleRequestMultipleObjects);
|
AddLocalPacketHandler(PacketType.RequestMultipleObjects, HandleRequestMultipleObjects);
|
||||||
AddLocalPacketHandler(PacketType.ObjectSelect, HandleObjectSelect);
|
AddLocalPacketHandler(PacketType.ObjectSelect, HandleObjectSelect, true, true);
|
||||||
AddLocalPacketHandler(PacketType.ObjectDeselect, HandleObjectDeselect);
|
AddLocalPacketHandler(PacketType.ObjectDeselect, HandleObjectDeselect, true, true);
|
||||||
AddLocalPacketHandler(PacketType.ObjectPosition, HandleObjectPosition);
|
AddLocalPacketHandler(PacketType.ObjectPosition, HandleObjectPosition);
|
||||||
AddLocalPacketHandler(PacketType.ObjectScale, HandleObjectScale);
|
AddLocalPacketHandler(PacketType.ObjectScale, HandleObjectScale);
|
||||||
AddLocalPacketHandler(PacketType.ObjectRotation, HandleObjectRotation);
|
AddLocalPacketHandler(PacketType.ObjectRotation, HandleObjectRotation);
|
||||||
|
|
|
@ -1222,7 +1222,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
outgoingPacket.SequenceNumber, isReliable, isResend, udpClient.AgentID, Scene.Name);
|
outgoingPacket.SequenceNumber, isReliable, isResend, udpClient.AgentID, Scene.Name);
|
||||||
|
|
||||||
// Put the UDP payload on the wire
|
// Put the UDP payload on the wire
|
||||||
AsyncBeginSend(buffer);
|
// AsyncBeginSend(buffer);
|
||||||
|
SyncSend(buffer);
|
||||||
|
|
||||||
// Keep track of when this packet was sent out (right now)
|
// Keep track of when this packet was sent out (right now)
|
||||||
outgoingPacket.TickCount = Environment.TickCount & Int32.MaxValue;
|
outgoingPacket.TickCount = Environment.TickCount & Int32.MaxValue;
|
||||||
|
@ -1907,7 +1908,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
Buffer.BlockCopy(packetData, 0, buffer.Data, 0, length);
|
Buffer.BlockCopy(packetData, 0, buffer.Data, 0, length);
|
||||||
|
|
||||||
AsyncBeginSend(buffer);
|
// AsyncBeginSend(buffer);
|
||||||
|
SyncSend(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected bool IsClientAuthorized(UseCircuitCodePacket useCircuitCode, out AuthenticateResponse sessionInfo)
|
protected bool IsClientAuthorized(UseCircuitCodePacket useCircuitCode, out AuthenticateResponse sessionInfo)
|
||||||
|
|
|
@ -487,7 +487,7 @@ namespace OpenMetaverse
|
||||||
}
|
}
|
||||||
catch (SocketException) { }
|
catch (SocketException) { }
|
||||||
catch (ObjectDisposedException) { }
|
catch (ObjectDisposedException) { }
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
void AsyncEndSend(IAsyncResult result)
|
void AsyncEndSend(IAsyncResult result)
|
||||||
|
@ -502,5 +502,25 @@ namespace OpenMetaverse
|
||||||
catch (SocketException) { }
|
catch (SocketException) { }
|
||||||
catch (ObjectDisposedException) { }
|
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) { }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue