UDSocketAddress.st
changeset 1164 41a2750af1fa
parent 818 2f8331ad12d4
child 1226 0114bd044aa9
--- a/UDSocketAddress.st	Thu Mar 27 14:29:58 2003 +0100
+++ b/UDSocketAddress.st	Thu Mar 27 14:30:01 2003 +0100
@@ -10,8 +10,10 @@
  hereby transferred.
 "
 
+"{ Package: 'stx:libbasic2' }"
+
 SocketAddress variableByteSubclass:#UDSocketAddress
-	instanceVariableNames:'name'
+	instanceVariableNames:''
 	classVariableNames:''
 	poolDictionaries:''
 	category:'OS-Sockets'
@@ -70,28 +72,69 @@
     "
 ! !
 
-!UDSocketAddress methodsFor:'private initialization'!
+!UDSocketAddress class methodsFor:'queries'!
+
+domainSymbol
 
-name: pathName
-    name := pathName
+    ^ #unix
+!
+
+socketAddressSize
+    ^ OperatingSystem socketAccessor socketAddressSize:#unix
 ! !
 
-!UDSocketAddress methodsFor:'queries'!
+!UDSocketAddress methodsFor:'accessing'!
+
+name
+
+    ^ self stringAt:3
+!
+
+name:pathName
+
+    self stringAt:3 put:pathName
+! !
+
+!UDSocketAddress methodsFor:'obsolete'!
 
 address
     ^ nil
 !
 
 hostName
-    ^ 'localhost'
+    ^ 'local'
+!
+
+hostName:hostOrPathName port:portNrOrName
+
+    self name:hostOrPathName
+!
+
+port:pathName
+
+    self name:pathName
 !
 
 portOrName
-    ^ name
+
+    ^ self name
+! !
+
+!UDSocketAddress methodsFor:'printing & storing'!
+
+printOn:aStream
+
+
+    aStream nextPutAll:self class name; 
+            nextPut:$(; nextPutAll:self name; nextPut:$)
+
+    "
+     (self name:'/tmp/abcde') printString
+    "
 ! !
 
 !UDSocketAddress class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/UDSocketAddress.st,v 1.7 1999-09-21 00:27:17 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/UDSocketAddress.st,v 1.8 2003-03-27 13:29:59 stefan Exp $'
 ! !