using System.IO;
using Crysome.Common.Network.Packets;

namespace Crysome.Common.Network.FileTransfer;

public sealed class FtDonePacket : IPacket
{
	public uint TransferId;

	public bool Success;

	public string Message;

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

	public void Read(BinaryReader r)
	{
		TransferId = r.ReadUInt32();
		Success = r.ReadBoolean();
		Message = r.ReadString();
	}
}
