--- a/UDSocketAddress.st Thu Nov 08 12:14:19 2007 +0100
+++ b/UDSocketAddress.st Thu Nov 08 15:03:14 2007 +0100
@@ -9,7 +9,6 @@
other person. No title to or ownership of the software is
hereby transferred.
"
-
"{ Package: 'stx:libbasic2' }"
SocketAddress variableByteSubclass:#UDSocketAddress
@@ -64,6 +63,15 @@
!UDSocketAddress class methodsFor:'instance creation'!
+allForHostName:hostName serviceName:portNrOrName type:socketTypeSymbol
+ (hostName notNil and:[hostName ~= 'localhost']) ifTrue:[
+ self error:'Only local connections possible with UD sockets'.
+ ^ nil.
+ ].
+
+ Array with:(self name:portNrOrName).
+!
+
anyHost
"there is nothing like a 'host' for unix domain sockets.
answer an empty address"
@@ -71,19 +79,6 @@
^ self new
!
-hostName:hostName serviceName:portNrOrName type:socketTypeSymbol
- (hostName notNil and:[hostName ~= 'localhost']) ifTrue:[
- self error:'Only local connections possible with UD sockets'.
- ^ nil.
- ].
- portNrOrName isNumber ifTrue:[
- self error:'UD sockets require a path argument'.
- ^ nil.
- ].
-
- ^ self name:portNrOrName
-!
-
name: pathName
^ self new name:pathName
@@ -93,6 +88,10 @@
!
peerName:peerName port:port
+ "use #name:"
+
+ <resource: #obsolete>
+ self obsoleteMethodWarning:'use name:'.
^ self name:peerName
! !
@@ -122,6 +121,9 @@
!
name:pathName
+ pathName isString ifFalse:[
+ self error:'Unix domain sockets require a path argument'.
+ ].
self stringAt:3 put:pathName
!
@@ -175,5 +177,5 @@
!UDSocketAddress class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic2/UDSocketAddress.st,v 1.14 2003-11-28 11:17:25 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic2/UDSocketAddress.st,v 1.15 2007-11-08 14:03:14 stefan Exp $'
! !