Package de.zh32.pingtest

Examples of de.zh32.pingtest.ServerListPing17.fetchData()


        }

        try {
            ServerListPing14 ping14 = new ServerListPing14();
            ping14.setAddress(inetSocketAddress);
            ping14.fetchData();
            return QueryVersion.mc14;
        } catch (Exception ex) {
        }

        try {
View Full Code Here


        switch (qv) {
            case mc14:
                try {
                    ServerListPing14 ping14 = new ServerListPing14();
                    ping14.setAddress(inetSocketAddress);
                    ping14.fetchData();
                    return ping14.getPlayersOnline();
                } catch (Exception ex) {
                }
                return -1; // Server not reachable so send -1 for offline
            case mc16:
View Full Code Here

        InetSocketAddress inetSocketAddress = new InetSocketAddress(host, port);

        try {
            ServerListPing16 ping16 = new ServerListPing16();
            ping16.setAddress(inetSocketAddress);
            ping16.fetchData();
            return QueryVersion.mc16;
        } catch (Exception ex) {
        }

        try {
View Full Code Here

                return -1; // Server not reachable so send -1 for offline
            case mc16:
                try {
                    ServerListPing16 ping16 = new ServerListPing16();
                    ping16.setAddress(inetSocketAddress);
                    ping16.fetchData();
                    return ping16.getPlayersOnline();
                } catch (Exception ex) {
                }
                return -1; // Server not reachable so send -1 for offline
            case mc17:
View Full Code Here

        // 1.7 must be queried last because if not, the rest of the checks will ALWAYS fail for some
        // reason of which I'm not sure of yet
        try {
            ServerListPing17 ping17 = new ServerListPing17();
            ping17.setAddress(inetSocketAddress);
            ping17.fetchData();
            return QueryVersion.mc17;
        } catch (Exception ex) {
        }

        return null; // Couldn't determine version so return null
View Full Code Here

                return -1; // Server not reachable so send -1 for offline
            case mc17:
                try {
                    ServerListPing17 ping17 = new ServerListPing17();
                    ping17.setAddress(inetSocketAddress);
                    StatusResponse response = ping17.fetchData();
                    return response.getPlayers().getOnline();
                } catch (Exception ex) {
                }
                return -1; // Server not reachable so send -1 for offline
            case mc18b:
View Full Code Here

        }

        try {
            ServerListPingB18 pingb18 = new ServerListPingB18();
            pingb18.setAddress(inetSocketAddress);
            pingb18.fetchData();
            return QueryVersion.mc18b;
        } catch (Exception ex) {
        }

        // 1.7 must be queried last because if not, the rest of the checks will ALWAYS fail for some
View Full Code Here

                return -1; // Server not reachable so send -1 for offline
            case mc18b:
                try {
                    ServerListPingB18 pingb18 = new ServerListPingB18();
                    pingb18.setAddress(inetSocketAddress);
                    pingb18.fetchData();
                    return pingb18.getPlayersOnline();
                } catch (Exception ex) {
                }
                return -1; // Server not reachable so send -1 for offline
            default:
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.