ace/Source/ACE.Server/Network/PacketHeaderFlagsUtil.cs
fartwhif 10498076d0 network stability (#1511)
* fixed bug causing disconnects due to NAK requests being dropped.
added asynchronous verification of encrypted CRCs
added checksum caching to ClientPacket
removed "generational ISAAC" debugging tools
fixed a bug causing session to enter an unspecified state when the connect request packet sent to the client was corrupted in transit
added handling of trusted packet with ClientSentNetErrorDisconnect flag
fixed bug during handshake causing defunct session to linger
fixed AccountSelectCallback was being called in both the try and catch sections of a try/catch block leading to crashes whenever a bad handshake occurs
implemented parsing of optional "flow" header data
added more network logging

* added packetLog to WorldManager
removed pre-processor definition NETDIAG and directives
2019-03-10 17:40:23 -04:00

21 lines
606 B
C#

using System.Collections.Generic;
using System.Linq;
namespace ACE.Server.Network
{
public static class PacketHeaderFlagsUtil
{
public static string UnfoldFlags(PacketHeaderFlags flags)
{
List<string> result = new List<string>();
foreach (PacketHeaderFlags r in System.Enum.GetValues(typeof(PacketHeaderFlags)))
{
if ((flags & r) != 0)
{
result.Add(r.ToString());
}
}
return result.DefaultIfEmpty().Aggregate((a, b) => a + " | " + b);
}
}
}