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.

54 lines
1.1 KiB

1 month ago
using System;
using System.Collections.Generic;
using System.Linq;
namespace FileTransDataObject
{
// 接收文件数据
public class FileRecvData
{
public int ReqFileOffset => recvSize;
public string filePath;
public string fileName;
public string fileMd5;
public int fileSize;
public DateTime fileTime;
public byte[] recvBuffer;
public int recvSize;
// 文件接收状态, -1 接收失败 0 接收中/等待中 1 接收成功
public int recvState;
}
// 文件接收节点: 负责主动向TransNode发送拉取文件请求
public class FileRecvNode
{
public bool IsFinish => state == 2;
// 发送方
public string senderHost;
// 传送序列号
public long transSeq;
public List<FileRecvData> fileList;
public long lastReqTime;
public long lastResTime;
// 0 接收中 1 接收结束 2 接收结果上报成功
public int state;
public FileRecvNode()
{
fileList = new List<FileRecvData>();
}
}
}