--- a/Socket.st Thu Oct 01 19:04:41 2015 +0200
+++ b/Socket.st Thu Oct 01 19:05:29 2015 +0200
@@ -1667,15 +1667,7 @@
This method will suspend the current process if no connection is waiting.
For ST-80 compatibility"
- |newSock|
-
- self readWait.
- newSock := self class new.
- (newSock primAcceptOn:self blocking:false) ifFalse:[
- "should raise an error here"
- ^ nil
- ].
- ^ newSock
+ ^ self waitForNewConnectionWithTimeout:nil
"
|sock newSock|
@@ -4147,11 +4139,18 @@
This method implements the inner wait-primitive of a single-connection
server application."
+ |newSock|
+
(self readWaitWithTimeout:timeoutSecondsOrNil) ifTrue:[
- "a timeout occurred - no connection within timeout"
- ^ nil
+ "a timeout occurred - no connection within timeout"
+ ^ nil
].
- ^ self accept.
+ newSock := self class new.
+ (newSock primAcceptOn:self blocking:false) ifFalse:[
+ "should raise an error here"
+ ^ nil
+ ].
+ ^ newSock
! !
!Socket class methodsFor:'documentation'!