#FEATURE by cg
authorClaus Gittinger <cg@exept.de>
Tue, 20 Feb 2018 01:07:18 +0100
changeset 4587 caa262d036d2
parent 4586 026976849997
child 4588 8219c3569807
#FEATURE by cg class: Socket added: #noTimeout class: Socket class added: #openConnectionToHostNamed:port:
Socket.st
--- a/Socket.st	Tue Feb 13 16:53:36 2018 +0100
+++ b/Socket.st	Tue Feb 20 01:07:18 2018 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1992 by Claus Gittinger
 	      All Rights Reserved
@@ -1080,6 +1082,10 @@
     "/ intentionally left blank here
 !
 
+openConnectionToHostNamed:hostName port:portNr
+    ^ self newTCPclientToHost:hostName port:portNr
+!
+
 standardDeadline
     "a standard timeout in seconds for connection setup;
      not really used in ST/X code (but by some code ported from squeak)"
@@ -1641,6 +1647,12 @@
     "Created: / 31-05-2007 / 17:59:47 / cg"
 !
 
+noTimeout
+    "disable timeouts - dummy for now"
+
+    ^ self 
+!
+
 peerName
     "return my peer (i.e. ipAddr + port);
      May return nil if not yet setup completely."
@@ -3874,7 +3886,6 @@
     "
 ! !
 
-
 !Socket methodsFor:'specials'!
 
 linger:anIntegerOrNil
@@ -4208,7 +4219,6 @@
     ^ self setSocketOption:#'TCP_NODELAY' argument:aBoolean argument:nil.
 ! !
 
-
 !Socket methodsFor:'waiting'!
 
 waitForNewConnectionOrDataOnAny:otherConnections timeout:secondsOrTimeDurationOrNil