* refactor: separate process of extracting packet from received data from actually processing that packet
parent
285ae803e2
commit
8ad0249969
|
@ -171,8 +171,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is called every time that we receive new UDP data. We pass this data on to the LLPacketServer
|
||||
/// except in the case that the packet is UseCircuitCode. In this case we set up the circuit code instead.
|
||||
/// This method is called every time that we receive new UDP data.
|
||||
/// </summary>
|
||||
/// <param name="result"></param>
|
||||
protected virtual void OnReceivedData(IAsyncResult result)
|
||||
|
@ -252,6 +251,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
BeginReceive();
|
||||
|
||||
if (packet != null)
|
||||
ProcessInPacket(packet);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Process a successfully received packet. We pass the packet on to the LLPacketServer
|
||||
/// except in the case that the packet is UseCircuitCode. In that case we set up the circuit code instead.
|
||||
/// </summary>
|
||||
/// <param name="packet"></param>
|
||||
protected virtual void ProcessInPacket(Packet packet)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -292,7 +300,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
m_log.Error("[CLIENT]: Exception in processing packet - ignoring: ", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void BeginReceive()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue