fixed anyHost
authorClaus Gittinger <cg@exept.de>
Wed, 16 Jul 2003 18:44:37 +0200
changeset 1281 6df4f8f211e3
parent 1280 b973855bfe74
child 1282 7e4ffdfd19f6
fixed anyHost
IPSocketAddress.st
IPv6SocketAddress.st
SocketAddress.st
--- a/IPSocketAddress.st	Tue Jul 15 14:20:11 2003 +0200
+++ b/IPSocketAddress.st	Wed Jul 16 18:44:37 2003 +0200
@@ -105,9 +105,9 @@
 !IPSocketAddress class methodsFor:'addressing'!
 
 anyAddress
-    "return the broadcast address"
+    "return the anonymous addresses bytes"
 
-    ^ #[255 255 255 255]
+    ^ #[0 0 0 0]
 !
 
 anyPort
@@ -116,6 +116,12 @@
     ^ 0
 !
 
+broadcastAddress
+    "return the broadcast address"
+
+    ^ #[255 255 255 255]
+!
+
 firstUnreservedPort
     "return the first unreserved port number"
 
@@ -279,5 +285,5 @@
 !IPSocketAddress class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/IPSocketAddress.st,v 1.22 2003-07-14 11:10:40 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/IPSocketAddress.st,v 1.23 2003-07-16 16:44:33 cg Exp $'
 ! !
--- a/IPv6SocketAddress.st	Tue Jul 15 14:20:11 2003 +0200
+++ b/IPv6SocketAddress.st	Wed Jul 16 18:44:37 2003 +0200
@@ -62,6 +62,14 @@
 "
 ! !
 
+!IPv6SocketAddress class methodsFor:'addressing'!
+
+anyAddress
+    "return the anonymous addresses bytes"
+
+    ^ #[0 0 0 0  0 0 0 0  0 0 0 0  0 0 0 0]
+! !
+
 !IPv6SocketAddress class methodsFor:'queries'!
 
 domainSymbol
@@ -103,5 +111,5 @@
 !IPv6SocketAddress class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/IPv6SocketAddress.st,v 1.10 2003-07-09 15:31:43 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/IPv6SocketAddress.st,v 1.11 2003-07-16 16:44:37 cg Exp $'
 ! !
--- a/SocketAddress.st	Tue Jul 15 14:20:11 2003 +0200
+++ b/SocketAddress.st	Wed Jul 16 18:44:37 2003 +0200
@@ -71,6 +71,12 @@
 
 !SocketAddress class methodsFor:'instance creation'!
 
+anyHost
+    "get a new instance representing the ANY-host address"
+
+    ^ self hostAddress:(self anyAddress) port:0
+!
+
 hostAddress:addr
     "get a new instance given addr-bytes"
 
@@ -171,6 +177,12 @@
    "
 ! !
 
+!SocketAddress class methodsFor:'addressing'!
+
+anyAddress
+    self subclassResponsibility
+! !
+
 !SocketAddress class methodsFor:'queries'!
 
 domainCode
@@ -616,5 +628,5 @@
 !SocketAddress class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/SocketAddress.st,v 1.21 2003-07-15 12:19:08 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/SocketAddress.st,v 1.22 2003-07-16 16:44:29 cg Exp $'
 ! !