public UDPClientSocket(Logger logger){
  this.logger=logger;
  try {
    socket=new DatagramSocket();
    socket.setBroadcast(true);
    socket.setSendBufferSize(1024 * 1024 * 8);
    socket.setReceiveBufferSize(1024 * 1024 * 8);
    socket.setSoTimeout(1);
  }
 catch (  SocketException e) {
    logger.severe("**** FAILED TO CREATE SOCKET!");
    logger.severe("java.net.SocketException: " + e.getMessage());
    System.exit(1);
  }
}

public UDPClientSocket ( Logger logger ) { this . logger = logger ; try { socket = new DatagramSocket ( ) ; socket . setBroadcast ( true ) ; socket . setSendBufferSize ( 1024 * 1024 * 8 ) ; socket . setReceiveBufferSize ( 1024 * 1024 * 8 ) ; socket . setSoTimeout ( 1 ) ; } catch ( SocketException e ) { logger . severe ( "**** FAILED TO CREATE SOCKET!" ) ; logger . severe ( "java.net.SocketException: " + e . getMessage ( ) ) ; System . exit ( 1 ) ; } }
create a new udp client socket with the specified logger .
