左晓为主开发手持机充值管理机
app/src/main/java/com/dayu/recharge/utils/SocketUtil.java
@@ -415,15 +415,22 @@
                try {
                    String myhost = host.replace("http://", "");
                    myhost = myhost.replace("https://", "");
                    InetAddress inetAddressArr = InetAddress.getByName(myhost);
//                    InetAddress inetAddressArr = InetAddress.getByName(myhost);
                    InetAddress[] inetAddressArrs=  InetAddress.getAllByName(myhost);
                    if (inetAddressArrs.length==1){
                        message.what = 1;
                        message.obj = inetAddressArrs[0].getHostAddress();
                    }else {
                        message.what = 2;
                        message.obj = inetAddressArrs;
                    message.what = 1;
                    message.obj = inetAddressArr.getHostAddress();
                    }
                    handler.sendMessage(message);
                } catch (UnknownHostException e) {
                    e.printStackTrace();
                    message.what = 2;
                    message.what = -1;
                    handler.sendMessage(message);
                }