You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Zero/ZeroLevel/Services/Network/FileTransfer/Model/FileFrame.cs

29 lines
856 B

using ZeroLevel.Services.Serialization;
namespace ZeroLevel.Services.Network.FileTransfer.Model
{
public sealed class FileFrame :
IBinarySerializable, IFileTransferInfo
{
public FileTransferInfoType TransferInfoType => FileTransferInfoType.Frame;
public long UploadFileTaskId { get; set; }
public long Offset { get; set; }
public byte[] Payload { get; set; }
public void Serialize(IBinaryWriter writer)
{
writer.WriteLong(this.UploadFileTaskId);
writer.WriteLong(this.Offset);
writer.WriteBytes(this.Payload);
}
public void Deserialize(IBinaryReader reader)
{
this.UploadFileTaskId = reader.ReadLong();
this.Offset = reader.ReadLong();
this.Payload = reader.ReadBytes();
}
}
}

Powered by TurnKey Linux.