/// <summary> /// /// </summary> /// <param name="RemotHost">远程IP地址</param> /// <param name="index">本机端唯一识别地址</param> public LockClient(string RemotHost, int RemotPort, int LocalPort, T index) { Connect = false; this.remotPort = RemotPort; Index = index; remotHost = RemotHost; lockUdp = new Udp(LocalPort); lockUdp.GetStringArgs += lockUdp_GetStringArgs; lockUdp.Open(); thConnectRemot = new Thread(() => Conn()); thConnectRemot.IsBackground = true; thConnectRemot.Start(); }
Channel[] lockList; //每一路互锁 public LockMultiChannleMain(int MainPort, int AllChannelCount) { AllChannel = new List <Channel>(); nowStatueList = new GetStatueList[AllChannelCount]; testValue = new string[AllChannelCount]; lockList = new Channel[AllChannelCount]; testingValue = new string[AllChannelCount]; for (int i = 0; i < AllChannelCount; i++) { nowStatueList[i] = GetStatueList.收到请求; testValue[i] = ""; lockList[i] = new Channel(); testingValue[i] = ""; } lockUdp = new Udp(MainPort); lockUdp.GetStringArgs += lockUpd_GetStringArgs; lockUdp.Open(); }
public LockMain(int MainPort) { lockUdp = new Udp(MainPort); lockUdp.GetStringArgs += lockUpd_GetStringArgs; lockUdp.Open(); }