예제 #1
0
        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和监听端口号
        }
예제 #2
0
 public WeatherUpdater(WeatherGetter dataGetter, ServerBLL bll)
 {
     weatherGetter = dataGetter;
     //server = uDPserver;
     bLL = bll;
 }