public AnnounceThread() throws IOException {
  super("discovery announcement");
  setDaemon(true);
  if (multicastInterfaces == null || multicastInterfaces.length > 0) {
    socket=new MulticastSocket();
    socket.setTimeToLive(multicastAnnouncementConstraints.getMulticastTimeToLive(Constants.getTtl()));
  }
 else {
    socket=null;
  }
}

public AnnounceThread ( ) throws IOException { super ( "discovery announcement" ) ; setDaemon ( true ) ; if ( multicastInterfaces == null || multicastInterfaces . length > 0 ) { socket = new MulticastSocket ( ) ; socket . setTimeToLive ( multicastAnnouncementConstraints . getMulticastTimeToLive ( Constants . getTtl ( ) ) ) ; } else { socket = null ; } }
create a daemon thread . set up the socket now rather than in run , so that we get any exception up front .
