Examples of replaceLocalAddresses()


Examples of org.jivesoftware.smackx.bytestreams.socks5.Socks5Proxy.replaceLocalAddresses()

        List<String> addresses = new ArrayList<String>(proxy.getLocalAddresses());
        addresses.add("1");
        addresses.add("2");
        addresses.add("3");

        proxy.replaceLocalAddresses(addresses);

        List<String> localAddresses = proxy.getLocalAddresses();
        for (int i = 0; i < addresses.size(); i++) {
            assertEquals(addresses.get(i), localAddresses.get(i));
        }
View Full Code Here

Examples of org.jivesoftware.smackx.bytestreams.socks5.Socks5Proxy.replaceLocalAddresses()

        Socks5Proxy socks5Proxy = Socks5Proxy.getSocks5Proxy();
        try {
            String address = InetAddress.getLocalHost().getHostAddress();
            List<String> addresses = new ArrayList<String>();
            addresses.add(address);
            socks5Proxy.replaceLocalAddresses(addresses);
        }
        catch (UnknownHostException e) {
            // ignore
        }
View Full Code Here

Examples of org.jivesoftware.smackx.bytestreams.socks5.Socks5Proxy.replaceLocalAddresses()

                if (!myAdresses.isEmpty()) {
                    // convert to List of Strings
                    List<String> myAdressesStr = new LinkedList<String>();
                    for (InetAddress ip : myAdresses)
                        myAdressesStr.add(ip.getHostAddress());
                    proxy.replaceLocalAddresses(myAdressesStr);
                }

                // Perform public IP detection concurrently
                // Dont perform if we know a local IP is the WAN IP
                if (stunHelper != null && !stunHelper.isLocalIPthePublicIP())
View Full Code Here

Examples of org.jivesoftware.smackx.bytestreams.socks5.Socks5Proxy.replaceLocalAddresses()

        }
        ArrayList<String> list = new ArrayList<String>(
            proxy.getLocalAddresses());
        list.remove(ip);
        list.add(0, ip);
        proxy.replaceLocalAddresses(list);
    }

}
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.