--- a/Socket.st Thu Jul 15 21:46:26 1999 +0200
+++ b/Socket.st Thu Jul 15 21:48:10 1999 +0200
@@ -1693,6 +1693,13 @@
^ self
!
+listenOn:aPort
+ self bindTo:aPort
+ address:nil
+ reuseAddress:true.
+ self listenFor:5.
+!
+
notReadySignal
"for now - this is not yet raised"
@@ -1733,6 +1740,15 @@
"Modified: 24.1.1997 / 23:52:52 / cg"
! !
+!Socket methodsFor:'Squeak compatibility'!
+
+peerName
+ "return my peer (i.e. ipAddr + port);
+ May return nil if not yet setup completely."
+
+ ^ self getPeer
+! !
+
!Socket methodsFor:'datagram transmission'!
receiveFrom:anAddressBuffer buffer:aDataBuffer
@@ -4079,8 +4095,24 @@
^ false
! !
+!Socket methodsFor:'waiting'!
+
+waitForConnectionUntil: deadline
+ "Wait up until the given deadline for a connection to be established.
+ Return true if a state change has happened by the deadline, false if still waiting."
+
+ | status |
+ status _ self primSocketConnectionStatus: socketHandle.
+ [(status = WaitingForConnection) and: [Time millisecondClockValue < deadline]]
+ whileTrue: [
+ semaphore waitTimeoutMSecs: (deadline - Time millisecondClockValue).
+ status _ self primSocketConnectionStatus: socketHandle].
+
+ ^ status ~= WaitingForConnection
+! !
+
!Socket class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic2/Socket.st,v 1.117 1999-06-01 15:45:54 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic2/Socket.st,v 1.118 1999-07-15 19:48:10 cg Exp $'
! !