日期:2014-05-17 浏览次数:20770 次
UdpClient client = new UdpClient();
IPEndPoint ep = new IPEndPoint(IPAddress.Parse(row.Cells[1].Value.ToString()), 7901);
client.Send(Encoding.UTF8.GetBytes(textBox1.Text.ToCharArray()), textBox1.Text.Length, ep);
UdpClient client = new UdpClient(7901);
IPEndPoint ep = null;
byte[] data = client.Receive(ref ep);
string data_receive = Encoding.UTF8.GetString(data);