How can I set Timeout of Socket?

Marcone marcone at email.com
Sun Nov 15 00:05:08 UTC 2020


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.





More information about the Digitalmars-d-learn mailing list