What can go wrong if I simply replace
socket = new Socket()
with
socket = SocketChannel.open().socket()?
Back
There are several.
Why do you want to interrupt the connect() call? Surely all you want is a connect timeout?