class UdpSend
{
public static void main(String[] args)throws Exception
{
DatagramSocket ds=new DatagramSocket();
byte[] buf="udp shi shen ma".getBytes();
DatagramPacket dp=new DatagramPacket(buf,buf.length,InetAddress.getByName("192.168.1.175"),10000);
ds.send(dp);
}
} |
|