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

27 lines
741 B

6 years ago
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();
}
}
}

Powered by TurnKey Linux.