Chris Hegarty wrote:
:
Ah yes, I just moved the socket close to after the version check. The client will be blocked (in the socks protocol handhake) until the socket on the server side is closed.

Updated test:

http://cr.openjdk.java.net/~chegar/6964547/webrev.02/webrev/test/java/net/Socks/SocksProxyVersion.java.html
This looks better but is (as you say) exploiting the fact that the handshake didn't complete. It might be cleaner and more obvious to the reader if the main thread waited for the "SOCKS server" thread to terminate. Just a suggestion to save time in the event that the test were to fail.

-Alan

Reply via email to