Protocol/Packets/ConnectionRefusedPacket.cs

A small packet class used by the protocol to represent a connection refusal message. It declares a Command value "ConnectionRefused" and carries an array of error strings in Errors.

using System.Text.Json.Serialization;

namespace APLib.Protocol.Packets;

public sealed class ConnectionRefusedPacket : APPacket
{
	[JsonPropertyName( "cmd" )]
	public override string Command => "ConnectionRefused";
	
	[JsonPropertyName( "errors" )]
	public string[] Errors { get; set; }
}