I searched google, this site and JavaRanch and I can not find the answer.
My program should get proxies from the selected file (I got this using the Java Classic Choos class and RandomAccessFile)
Then I need to check the proxy, starting with the first one, which is in the txt file. He will try to connect to some site or port to check if the connection was successful. If the connection was successful (I received a positive response), it will add the proxy server to the proxy list, and then it will receive and check the next one on the list until this is done.
I know how to do this, but I have a little problem. My problem is that this process should be independent of the connection speed, because someone can set a timeout of 15000 (milliseconds) for the connection to be processed, and set 100 threads, and then none of the proxies will exit out of work because the connection is too slow.
I heard about the pinging method for checking proxies, but I don't know how to use it in java.
Can someone give me a solution or at least classes that I could use.
user1021229
source share