/// <summary> /// Handles an internal VSL packet. Ensure using the correct <see cref="CryptoAlgorithm"/>. /// </summary> internal Task <bool> HandleInternalPacketAsync(PacketRule rule, byte[] content) { IPacket packet = rule.Packet.New(); try { using (PacketBuffer buf = PacketBuffer.CreateStatic(content)) packet.ReadPacket(buf); } catch (ArgumentException ex) { parent.ExceptionHandler.CloseConnection(ex); return(Task.FromResult(false)); } return(packet.HandlePacketAsync(this)); }