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
841 B

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

Powered by TurnKey Linux.