using System.IO;

namespace Crysome.Common.Network.Packets.Client;

public class ProxyStatusResponsePacket : IPacket
{
	public bool Active { get; set; }

	public string Message { get; set; }

	public ProxyStatusResponsePacket()
	{
		Message = "";
	}

	public ProxyStatusResponsePacket(bool active, string message)
	{
		Active = active;
		Message = message ?? "";
	}

	public void Write(BinaryWriter w)
	{
		w.Write(Active);
		w.Write(Message ?? "");
	}

	public void Read(BinaryReader r)
	{
		Active = r.ReadBoolean();
		Message = r.ReadString();
	}
}
