public UDPserver(ServerBLL disposal) { _disposal = disposal; udpcSend = new UdpClient(8888); var reader = new AppSettingsReader(); var data = reader.GetValue("listenSocket", typeof(string)).ToString(); var ipAndPort = data.Split(":"); localIpep = new IPEndPoint(IPAddress.Parse(ipAndPort[0]), int.Parse(ipAndPort[1])); // 本机IP和监听端口号 }
public WeatherUpdater(WeatherGetter dataGetter, ServerBLL bll) { weatherGetter = dataGetter; //server = uDPserver; bLL = bll; }