public void connect(CpsNet _cpsNet) { reconnect_counter++; cpsNet = _cpsNet; DicSensorVal = new Dictionary <short, float>(); if (client_udp != null) { if (client_udp.RemoteIp != _ip) { client_udp.RemoteIp = _ip; } if (client_udp.RemotePort != _port) { client_udp.RemotePort = _port; } } else { client_udp = cpsNet.newClient(_ip, _port.ToString()); } Frame f = new Frame(client_udp); f.SetHeaderFlag(FrameHeaderFlag.SYNC); send(f); //initRequestTimer(); //SendMsg = new Thread(new ThreadStart(initRequestTimer)); //SendMsg.IsBackground = true; //SendMsg.Start(); }
public object newClient(string ip, string port) { return(CpsNet.newClient(ip, port)); }