class: SocketAddress
authorStefan Vogel <sv@exept.de>
Tue, 03 Mar 2015 00:21:37 +0100
changeset 3521 7c99b949224b
parent 3520 669dd5b0ce2e
child 3522 ef4bcb09a540
class: SocketAddress removed: #hasSameHostAddress: category of: #sameHostAddress:
SocketAddress.st
--- a/SocketAddress.st	Tue Mar 03 00:21:26 2015 +0100
+++ b/SocketAddress.st	Tue Mar 03 00:21:37 2015 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1995 by Claus Gittinger
 	      All Rights Reserved
@@ -680,11 +678,17 @@
 
 !SocketAddress methodsFor:'comparing'!
 
-hasSameHostAddress:aSocketAddress
-    "answer true, if myself and aSocketAddress have the same host address
-     (but possibly different ports)."
+sameHostAddress:aSocketAddress
+    "answer true, if aSocketAddres has the same hostaddress as myself"
+
+    ^ self class = aSocketAddress class 
+        and:[self hostAddress = aSocketAddress hostAddress] 
 
-    ^ self subclassResponsibility
+    "
+     (IPSocketAddress hostAddress:#[193 141 12 193] port:80)
+        sameHostAddress:
+     (IPSocketAddress hostAddress:#[193 141 12 193] port:81)
+    "
 ! !
 
 !SocketAddress methodsFor:'hashing'!
@@ -803,19 +807,6 @@
     ^ self subclassResponsibility
 !
 
-sameHostAddress:aSocketAddress
-    "answer true, if aSocketAddres has the same hostaddress as myself"
-
-    ^ self class = aSocketAddress class 
-        and:[self hostAddress = aSocketAddress hostAddress] 
-
-    "
-     (IPSocketAddress hostAddress:#[193 141 12 193] port:80)
-        sameHostAddress:
-     (IPSocketAddress hostAddress:#[193 141 12 193] port:81)
-    "
-!
-
 serviceName
     ^ (self class getNameInfo:self wantHostName:false 
                   wantServiceName:true datagram:false flags:0) second
@@ -860,10 +851,10 @@
 !SocketAddress class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/SocketAddress.st,v 1.48 2015-03-02 22:42:44 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/SocketAddress.st,v 1.49 2015-03-02 23:21:37 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic2/SocketAddress.st,v 1.48 2015-03-02 22:42:44 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/SocketAddress.st,v 1.49 2015-03-02 23:21:37 stefan Exp $'
 ! !