class: Socket
authorStefan Vogel <sv@exept.de>
Fri, 18 Apr 2014 16:36:53 +0200
changeset 3247 259f71b89b6e
parent 3246 c75a006f9a7a
child 3248 309a8d08428a
class: Socket changed: #primAcceptOn:blocking: fix prev change for linux
Socket.st
--- a/Socket.st	Fri Apr 18 15:08:16 2014 +0200
+++ b/Socket.st	Fri Apr 18 16:36:53 2014 +0200
@@ -9,8 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-'From Smalltalk/X, Version:6.2.3.0 on 18-04-2014 at 00:46:01'                   !
-
 "{ Package: 'stx:libbasic2' }"
 
 NonPositionableExternalStream subclass:#Socket
@@ -2922,7 +2920,11 @@
     union sockaddr_u sa;
     unsigned int alen;
 
+#ifdef WIN32
     serverSocket = SOCKET_FROM_FILE_OBJECT(serverSocketHandle);
+#else
+    serverSocket = __intVal(serverSocketHandle);
+#endif
 
 # if defined(O_NONBLOCK) && defined(SET_NDELAY)
     if (blocking == false) {
@@ -3296,9 +3298,6 @@
             DBGFPRINTF((stderr, "SOCKET: shutDown -> %d (%d)\n", ret, __threadErrno));
         } while ((ret < 0) && (__threadErrno == EINTR));
 # else
-        if (how > 0 && __INST(buffered) == true) {
-            fflush(fp);
-        }
         __BEGIN_INTERRUPTABLE__
         shutdown(sock, how);
         __END_INTERRUPTABLE__
@@ -3724,22 +3723,6 @@
     "
 ! !
 
-!Socket methodsFor:'special'!
-
-reOpenIfPossible
-    "If the socket was listening (server-sockets), try to reopen it"
-
-    listening ifFalse:[ ^ self ].
-    [
-        self domain:domain type:socketType protocol:protocol reuseAddress:true.
-        self bindTo:port address:nil.
-        self listenFor: 5
-    ] on: OpenError do:[
-        "Nothing, socket could not be reopened"
-    ].
-
-    "Created: / 17-08-2012 / 15:43:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
 
 !Socket methodsFor:'specials'!
 
@@ -4016,13 +3999,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'!
 
@@ -4110,10 +4086,10 @@
 !Socket class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/Socket.st,v 1.303 2014-04-18 13:08:16 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/Socket.st,v 1.304 2014-04-18 14:36:53 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic2/Socket.st,v 1.303 2014-04-18 13:08:16 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/Socket.st,v 1.304 2014-04-18 14:36:53 stefan Exp $'
 ! !