#DOCUMENTATION by stefan
authorStefan Vogel <sv@exept.de>
Mon, 28 Jan 2019 16:01:42 +0100
changeset 4791 1323fc4dc376
parent 4790 bacf758a10cc
child 4792 4761045dca42
#DOCUMENTATION by stefan class: Socket class comment/format in: #newTCPclientToHost:port:domain:withTimeout:
Socket.st
--- 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