public DatagramChannelConfig setTimeToLive(int ttl) {
if (javaSocket instanceof MulticastSocket) {
try {
((MulticastSocket) javaSocket).setTimeToLive(ttl);
} catch (IOException e) {
throw new ChannelException(e);
}
} else {
throw new UnsupportedOperationException();
}
return this;