public UdpSender(string host, int port) { IPAddress[] ips = Dns.GetHostAddresses(host); e = new IPEndPoint(ips[0], port); sock = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); }