摘要:
DatagramPacket:UDP数据包DatagramSocket:UDP Socket// 发送数据byte[] message = "Hello, UDP".getBytes(); // 发送的数据InetAddress address = InetAddress.getByName("192.168.1.1"); // 接收主机IPint portNum = 11024; // 接收端口号DatagramSocket sendSocket = new DatagramSocket(); // UDP SocketDatagramPacket d 阅读全文