--- a/Socket.st Wed Mar 26 14:48:55 2014 +0100
+++ b/Socket.st Fri Mar 28 00:06:05 2014 +0100
@@ -48,8 +48,11 @@
/*
* mhmh - WIN32-fclose has a problem in trying to close() the socket
* instead of closesocket()'ing it
+ *
+ * According to: http://msdn.microsoft.com/ru-ru/library/fxfsw25t%28v=vs.100%29.aspx
+ * fclose() does a closesocket() too!
*/
-# define CLOSESOCKET_AFTER_FCLOSE
+# define xxCLOSESOCKET_AFTER_FCLOSE
# define xxCLOSESOCKET_BEFORE_FCLOSE
# ifdef __MINGW__
@@ -2907,51 +2910,6 @@
^ self listenFor:aNumber
!
-pollingWaitForNewConnectionOrDataOnAny:otherConnections timeout:timeoutSeconds
- <resource: #obsolete>
- "stupid MSDOS does not support select on sockets (sigh).
- Must poll here."
-
- |millis newConnection|
-
- millis := timeoutSeconds * 1000.
- [millis > 0] whileTrue:[
- otherConnections size > 0 ifTrue:[
- otherConnections do:[:aConnection |
- aConnection canReadWithoutBlocking ifTrue:[
- ^ aConnection
- ]
- ].
- ].
- newConnection := self blockingAccept.
- newConnection notNil ifTrue:[^ newConnection].
- Delay waitForMilliseconds:20.
- millis := millis - 20.
- ].
- ^ nil.
-!
-
-pollingWaitForNewConnectionWithTimeout:timeoutSeconds
- <resource: #obsolete>
- "stupid MSDOS does not support select on sockets (sigh).
- Must poll here."
-
- |millis newConnection|
-
- timeoutSeconds notNil ifTrue:[
- millis := timeoutSeconds * 1000.
- ].
- [millis isNil or:[millis > 0]] whileTrue:[
- newConnection := self blockingAccept.
- newConnection notNil ifTrue:[^ newConnection].
- Delay waitForMilliseconds:20.
- millis notNil ifTrue:[
- millis := millis - 20.
- ]
- ].
- ^ nil.
-!
-
primAcceptOn:aSocket blocking:blocking
"accept a connection on a server port (created with:'Socket>>newTCP:')
usage is: (Socket basicNew acceptOn:(Socket newTCP:9999)).
@@ -3848,6 +3806,7 @@
"
! !
+
!Socket methodsFor:'specials'!
receiveBufferSize
@@ -4117,13 +4076,6 @@
^ self setSocketOption:#'TCP_NODELAY' argument:aBoolean argument:nil.
! !
-!Socket methodsFor:'testing'!
-
-isSocket
- ^true
-
- "Created: / 17-08-2012 / 15:32:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
!Socket methodsFor:'waiting'!
@@ -4211,10 +4163,10 @@
!Socket class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic2/Socket.st,v 1.296 2014-01-29 13:35:33 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic2/Socket.st,v 1.297 2014-03-27 23:06:05 stefan Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic2/Socket.st,v 1.296 2014-01-29 13:35:33 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic2/Socket.st,v 1.297 2014-03-27 23:06:05 stefan Exp $'
! !