Cod:
byte[] buf = new byte[size];
DatagramSocket socket = null;
DatagramPacket packet;
InetAddress address =InetAddress.getByName("2001:0db8:85a3:08d3:1319:8a2e:0370:7348");
socket = new DatagramSocket(port);
for(int i = 1; i <= nrPackets; i++)
{
packet = new DatagramPacket(buf, buf.length, address, port);
try {
socket.send(packet);
} catch (IOException e)
{ e.printStackTrace(); }
}
socket.close();
Dupa cum vezi, nu e nici o diferenta. Pur si simplu pui IP-ul in format IPv6, si gata.
Sincer, ma bucur ca preferi craiovaforum in loc de google, dar o cautare pe google cu titlul subiectului tau "ipv6 on java" aduce PRIMUL LINK: http://java.sun.com/j2se/1.5.0/docs/...ide/index.html
Acolo arata f clar:
You can run the same bytecode for this example in IPv6 mode if both your local host machine and the destination machine (taranis) are IPv6-enabled.