code: public static String toIpString(InetSocketAddress address) {
          if (address == null) {
              return null;
          } else {
              InetAddress inetAddress = address.getAddress();
              return inetAddress == null ? address.getHostName() :
                  inetAddress.getHostAddress();
          }
      }
docs: 得到ip地址
  
  @param address InetSocketAddress
  @return ip地址