在類EpollDatagramChannelConfig,有4個方法是這樣的: @Override
public EpollDatagramChannelConfig setTimeToLive(int ttl) {
throw new UnsupportedOperationException("Multicast not supported");
}
它們是: setLoop
我有一些代碼從多播套接字讀取數據直到用戶定義的結束時間。如果線程通過調用Thread.interrupt(或通過您可以提出的任何其他用戶啓動的操作)中斷,我還想停止讀取數據。當線程中斷時,我無法弄清楚如何獲得通知。現有的代碼如下: // These are the constants I am given
final int mcastPort = ...;
final InetAddre