On Sunday, 15 November 2020 at 00:05:08 UTC, Marcone wrote:
Socket s = new Socket(AddressFamily.INET, SocketType.STREAM);
s.connect(new InternetAddress("domain.com", 80));
I want that program raise an error if reach for example 30
seconds of timeout.
My program does something like this.
On Sunday, 15 November 2020 at 00:05:08 UTC, Marcone wrote:
Socket s = new Socket(AddressFamily.INET, SocketType.STREAM);
s.connect(new InternetAddress("domain.com", 80));
I want that program raise an error if reach for example 30
seconds of timeout.
Perhaps using Socket.select and
Socket s = new Socket(AddressFamily.INET, SocketType.STREAM);
s.connect(new InternetAddress("domain.com", 80));
I want that program raise an error if reach for example 30
seconds of timeout.