Code/Protocol/Packets/ConnectionRefusedPacket.cs

A simple packet type used by the protocol to represent a connection refusal. It defines the command name "ConnectionRefused" and carries an array of error strings in the Errors property.

using System.Text.Json.Serialization;

namespace APLib.Protocol.Packets;

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