protected void Page_Load(object sender, EventArgs e) { byte[] data = new byte[1024]; IPEndPoint ip = new IPEndPoint(IPAddress.Parse("192.168.0.109"), 10006); Socket server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); string welcome = "Hello"; data = Encoding.ASCII.GetBytes(welcome); server.SendTo(data, data.Length, SocketFlags.None, ip); IPEndPoint sender11 = new IPEndPoint(IPAddress.Parse("192.168.0.109"), 10009); // IPEndPoint sender11 = (IPEndPoint)ClientID EndPoint tmpRemote = (EndPoint)sender11; data = new byte[1024]; int receivedDataLength = server.ReceiveFrom(data, ref tmpRemote); Response.Write(tmpRemote.ToString()); Response.Write(Encoding.ASCII.GetString(data, 0, receivedDataLength));
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)