*TEST* send udp sync. Stop uncontroled and hidden use of IO threads.
Testing this may require several people.avinationmerge
parent
a301bad8ad
commit
8c41271b33
|
@ -1305,7 +1305,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
PacketsSentCount++;
|
PacketsSentCount++;
|
||||||
|
|
||||||
// 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;
|
||||||
|
|
|
@ -375,12 +375,28 @@ namespace OpenMetaverse
|
||||||
|
|
||||||
// Synchronous mode waits until the packet callback completes
|
// Synchronous mode waits until the packet callback completes
|
||||||
// before starting the receive to fetch another packet
|
// before starting the receive to fetch another packet
|
||||||
if (!m_asyncPacketHandling)
|
// if (!m_asyncPacketHandling)
|
||||||
AsyncBeginReceive();
|
AsyncBeginReceive();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SyncSend(UDPPacketBuffer buf)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
m_udpSocket.SendTo(
|
||||||
|
buf.Data,
|
||||||
|
0,
|
||||||
|
buf.DataLength,
|
||||||
|
SocketFlags.None,
|
||||||
|
buf.RemoteEndPoint
|
||||||
|
);
|
||||||
|
}
|
||||||
|
catch (SocketException) { }
|
||||||
|
catch (ObjectDisposedException) { }
|
||||||
|
}
|
||||||
|
|
||||||
public void AsyncBeginSend(UDPPacketBuffer buf)
|
public void AsyncBeginSend(UDPPacketBuffer buf)
|
||||||
{
|
{
|
||||||
// if (IsRunningOutbound)
|
// if (IsRunningOutbound)
|
||||||
|
|
Loading…
Reference in New Issue