public static boolean isAvailable(int port){
		if (port < 0) {
			return false;
		}
		
		ServerSocket ss = null;
		DatagramSocket ds = null;
		
		try {
			ss = new ServerSocket(port);
			ss.setReuseAddress(true);	//ServerSocket类中，默认值为false，该方法必须在绑定端口前使用才有效
			ds = new DatagramSocket(port);
			ss.setReuseAddress(true);
			
			return true;
		} catch (IOException e) {
		} finally {
			if (ds != null) {
				ds.close();
			}
			if (ss != null) {
				try {
					ss.close();
				} catch (IOException e) {
				}
			}
		}
		
		return false;
	}