byte[] ff = { 0x55, 0xAA, 0x90, 0x00, 0x00, 0x00, 0x90};
IPEndPoint MyRemoteEndPoint = new IPEndPoint(IPAddress.Parse("192.168.15.255"), 8234);
MyClient2.Send(ff, ff.Length, MyRemoteEndPoint);
byte[] ff1 = { 0x55, 0xAA, 0x91, 0x00, 0x00, 0x00, 0x91 };
IPEndPoint MyRemoteEndPoint1 = new IPEndPoint(IPAddress.Parse("192.168.15.255"), 8234);
MyClient2.Send(ff1, ff1.Length, MyRemoteEndPoint1);
byte[] ff2= { 0x55, 0xAA, 0x92, 0x00, 0x00, 0x00, 0x92 };
IPEndPoint MyRemoteEndPoint2 = new IPEndPoint(IPAddress.Parse("192.168.15.255"), 8234);
MyClient2.Send(ff2, ff2.Length, MyRemoteEndPoint2);
byte[] ff3 = { 0x55, 0xAA, 0x93, 0x00, 0x00, 0x00, 0x93 };
IPEndPoint MyRemoteEndPoint3 = new IPEndPoint(IPAddress.Parse("192.168.15.255"), 8234);
MyClient2.Send(ff3, ff3.Length, MyRemoteEndPoint3);
byte[] ff4 = { 0x55, 0xAA, 0x94, 0x00, 0x00, 0x00, 0x94 };
IPEndPoint MyRemoteEndPoint4 = new IPEndPoint(IPAddress.Parse("192.168.15.255"), 8234);
MyClient2.Send(ff4, ff4.Length, MyRemoteEndPoint4);
byte[] ff5 = { 0x55, 0xAA, 0x95, 0x00, 0x00, 0x00, 0x95 };
IPEndPoint MyRemoteEndPoint5 = new IPEndPoint(IPAddress.Parse("192.168.15.255"), 8234);
MyClient2.Send(ff5, ff5.Length, MyRemoteEndPoint5);
byte[] ff6 = { 0x55, 0xAA, 0x96, 0x00, 0x00, 0x00, 0x96 };
IPEndPoint MyRemoteEndPoint6 = new IPEndPoint(IPAddress.Parse("192.168.15.255"), 8234);
MyClient2.Send(ff6, ff6.Length, MyRemoteEndPoint6);
byte[] ff7 = { 0x55, 0xAA, 0x97, 0x00, 0x00, 0x00, 0x97 };
IPEndPoint MyRemoteEndPoint7 = new IPEndPoint(IPAddress.Parse("192.168.15.255"), 8234);
MyClient2.Send(ff7, ff7.Length, MyRemoteEndPoint7);
byte[] ff8 = { 0x55, 0xAA, 0x98, 0x00, 0x00, 0x00, 0x98 };
IPEndPoint MyRemoteEndPoint8 = new IPEndPoint(IPAddress.Parse("192.168.15.255"), 8234);
MyClient2.Send(ff8, ff8.Length, MyRemoteEndPoint8);
byte[] ff9 = { 0x55, 0xAA, 0x99, 0x00, 0x00, 0x00, 0x99 };
IPEndPoint MyRemoteEndPoint9 = new IPEndPoint(IPAddress.Parse("192.168.15.255"), 8234);
MyClient2.Send(ff9, ff9.Length, MyRemoteEndPoint9);
byte[] ff10 = { 0x55, 0xAA, 0x9A, 0x00, 0x00, 0x00, 0x9A };
IPEndPoint MyRemoteEndPoint10 = new IPEndPoint(IPAddress.Parse("192.168.15.255"), 8234);
MyClient2.Send(ff10, ff10.Length, MyRemoteEndPoint10);
byte[] ff11 = { 0x55, 0xAA, 0x9B, 0x00, 0x00, 0x00, 0x9B };
IPEndPoint MyRemoteEndPoint11 = new IPEndPoint(IPAddress.Parse("192.168.15.255"), 8234);
MyClient2.Send(ff11, ff11.Length, MyRemoteEndPoint11);
byte[] ff12 = { 0x55, 0xAA, 0x9C, 0x00, 0x00, 0x00, 0x9C };
IPEndPoint MyRemoteEndPoint12 = new IPEndPoint(IPAddress.Parse("192.168.15.255"), 8234);
MyClient2.Send(ff12, ff12.Length, MyRemoteEndPoint12);
byte[] ff13 = { 0x55, 0xAA, 0x9D, 0x00, 0x00, 0x00, 0x9D };
IPEndPoint MyRemoteEndPoint13 = new IPEndPoint(IPAddress.Parse("192.168.15.255"), 8234);
MyClient2.Send(ff13, ff13.Length, MyRemoteEndPoint13);
byte[] ff14 = { 0x55, 0xAA, 0x9E, 0x00, 0x00, 0x00, 0x9E };
IPEndPoint MyRemoteEndPoint14 = new IPEndPoint(IPAddress.Parse("192.168.15.255"), 8234);
MyClient2.Send(ff14, ff14.Length, MyRemoteEndPoint14);
byte[] ff15 = { 0x55, 0xAA, 0x9F, 0x00, 0x00, 0x00, 0x9F };
IPEndPoint MyRemoteEndPoint15 = new IPEndPoint(IPAddress.Parse("192.168.15.255"), 8234);
MyClient2.Send(ff15, ff15.Length, MyRemoteEndPoint15);
udp是异步的,所以,Client可以重用的吧。实例化一个就可以了。然后:
IPEndPoint MyRemoteEndPoint = new IPEndPoint(IPAddress.Parse("192.168.15.255"), 8234);
MyClient2.Send({ 0x55, 0xAA, 0x9F, 0x00, 0x00, 0x00, 0x9C}, 7, MyRemoteEndPoint15);
MyClient2.Send({ 0x55, 0xAA, 0x9F, 0x00, 0x00, 0x00, 0x9D }, 7, MyRemoteEndPoint15);
MyClient2.Send({ 0x55, 0xAA, 0x9F, 0x00, 0x00, 0x00, 0x9E }, 7, MyRemoteEndPoint15);
MyClient2.Send({ 0x55, 0xAA, 0x9F, 0x00, 0x00, 0x00, 0x9F }, 7, MyRemoteEndPoint15);
OK,谢谢