Code example for DatagramSocket

Methods: setReuseAddress

0
		 
		try { 
			 
			this.port    = port;
			this.address = InetAddress.getByName(ip);
			this.socket  = new DatagramSocket();
			this.socket.setReuseAddress(true);
		} 
		catch (SocketException e) {
 
			Log.e("ANDNTP", "Error attempting to open the Director socket for ip address: " + ip);
			status = Status.SOCKET_OPEN_FAILURE;
		} 
		catch(UnknownHostException e) {
			 
			Log.e("ANDNTP", "Error attempting to get the Director ip address: " + ip);
			status = Status.IP_RESOLUTION_FAILURE;
		} 
	} 
 
	public boolean isShowDataChecked() {