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 fileList; public long lastReqTime; public long lastResTime; // 0 接收中 1 接收结束 2 接收结果上报成功 public int state; public FileRecvNode() { fileList = new List(); } } }