static void PacketHandler(Packet packet) { IpV4Datagram ip = packet.Ethernet.IpV4; UdpDatagram udp = ip.Udp; if (udp == null || (udp.SourcePort != 5056 && udp.DestinationPort != 5056)) { return; } albionParser.ReceivePacket(udp.Payload.ToArray()); }