I'm porting some old code, and getting this deprecation notice. What should I be upgrading this to?
warning: [deprecation] send(java.net.DatagramPacket,byte) in java.net.MulticastSocket has been deprecated
socket.send(packet,(byte)ttl);
This is the code in question:
packet = new DatagramPacket(msg, msg.length, address, port);
socket.send(packet,(byte)ttl);
update:
If you are having problems with setting TTL (i.e. when you look at the packets, the TTL is always 1), then updating this code will not help (although it does make the deprecation warning go away). It's likely that you've encountered the Java runtime bug discussed here: