super(MTU);   this.address = address; this.port = port; this.callback = cb;  try { if(allowReuse) { socket = new DatagramSocket(null); socket.setReuseAddress(true); socket.bind(new InetSocketAddress(address, port)); } else { socket = new DatagramSocket(port, address); }   socket.setSoTimeout(0); }catch(SocketException e) { e.printStackTrace(); throw new ServiceLocationException(ServiceLocationException.NETWORK_INIT_FAILED, "Could not create a socket on " + address.getHostAddress() + " port " + port); }   Thread t = new Thread(this); t.start();
this(address, port, false, MTU, cb);
    public SlpUnicastClient(InetAddress address, int port, boolean allowReuse,                            int MTU, SlpUdpCallback cb) throws ServiceLocationException {        super(MTU);                // update variables        this.address = address;        this.port = port;        this.callback = cb;                try {            if(allowReuse) {                socket = new DatagramSocket(null);                socket.setReuseAddress(true);                socket.bind(new InetSocketAddress(address, port));            }            else {                socket = new DatagramSocket(port, address);            }                        // set timeout to 0. (no timeout)            socket.setSoTimeout(0);        }catch(SocketException e) {            e.printStackTrace();            throw new ServiceLocationException(ServiceLocationException.NETWORK_INIT_FAILED,                                               "Could not create a socket on " +                                                address.getHostAddress() + " port " + port);        }                //start listenerthread...        Thread t = new Thread(this);        t.start();    }