public UdpSender ( string host, int port ) : System | ||
host | string | |
port | int | |
return | System |
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);
}