using System.Collections.Generic; using System.Net; using System.Threading.Tasks; namespace ETModel { public class LockInfo { public IPEndPoint Address; public TaskCompletionSource Tcs; public LockInfo(IPEndPoint address, TaskCompletionSource tcs) { this.Address = address; this.Tcs = tcs; } } public class MasterComponent : Component { /// 镜像的地址 public readonly List ghostsAddress = new List(); /// 当前获取锁的进程地址 public IPEndPoint lockedAddress; /// 请求锁的队列 public readonly Queue queue = new Queue(); } }