要通过 DatagramPacket 发送字符串,我们使用:
String msg = "example";
byte[]data = msg.getBytes();
DatagramPacket pktOut = new DatagramPacket(data, 0, data.length, dest, port)
如何通过 DatagramPacket 发送数组?
int num[] = {50,20,45,82,25,63};
//I need to send this over two packets, but I don't know how to deal
//with arrays when sending them
先感谢您