mirror of https://github.com/ogoun/Zero.git
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.
27 lines
741 B
27 lines
741 B
using ZeroLevel.Services.Serialization;
|
|
|
|
namespace ZeroLevel.Services.Network.FileTransfer.Model
|
|
{
|
|
public sealed class FileFrame :
|
|
IBinarySerializable
|
|
{
|
|
public int UploadTaskId { get; set; }
|
|
public long Offset { get; set; }
|
|
public byte[] Payload { get; set; }
|
|
|
|
public void Serialize(IBinaryWriter writer)
|
|
{
|
|
writer.WriteInt32(this.UploadTaskId);
|
|
writer.WriteLong(this.Offset);
|
|
writer.WriteBytes(this.Payload);
|
|
}
|
|
|
|
public void Deserialize(IBinaryReader reader)
|
|
{
|
|
this.UploadTaskId = reader.ReadInt32();
|
|
this.Offset = reader.ReadLong();
|
|
this.Payload = reader.ReadBytes();
|
|
}
|
|
}
|
|
}
|