Socket.st
changeset 4791 1323fc4dc376
parent 4774 acc6c997c195
child 4795 58f0486fe4ba
--- a/Socket.st	Mon Jan 14 18:25:27 2019 +0100
+++ b/Socket.st	Mon Jan 28 16:01:42 2019 +0100
@@ -927,14 +927,21 @@
     ].
     ^ nil.
 
-    "
+    "<<EOC
       Socket newTCPclientToHost:'www.exept.de' port:80 domain:#'AF_INET' withTimeout:1000.
       Socket newTCPclientToHost:'www.exept.de' port:80 domain:#'AF_INET6' withTimeout:1000.
       Socket newTCPclientToHost:'www.exept.de' port:80 domain:nil withTimeout:1000.
-      Socket newTCPclientToHost:'localhost' port:'nntp' withTimeout:1000
-    "
+
+      [
+        "if nobody is listening (Connection refused") the timeout does not apply"
+        Socket newTCPclientToHost:'localhost' port:'nntp' withTimeout:10s
+      ] on:SocketErrorNotification do:[:ex|
+        ex halt.
+      ].
+EOC"
 
     "Modified: / 19-01-2018 / 18:12:29 / stefan"
+    "Modified: / 28-01-2019 / 10:48:18 / Stefan Vogel"
 !
 
 newTCPclientToHost:hostNameOrAddress port:aPortOrServiceName withTimeout:milliSecondsOrTimeDuration