815
|
1 |
"
|
|
2 |
COPYRIGHT (c) 1999 by eXept Software AG
|
|
3 |
All Rights Reserved
|
|
4 |
|
|
5 |
This software is furnished under a license and may be used
|
|
6 |
only in accordance with the terms of that license and with the
|
|
7 |
inclusion of the above copyright notice. This software may not
|
|
8 |
be provided or otherwise made available to, or used by, any
|
|
9 |
other person. No title to or ownership of the software is
|
|
10 |
hereby transferred.
|
|
11 |
"
|
|
12 |
|
|
13 |
|
|
14 |
SocketAddress subclass:#AppletalkSocketAddress
|
|
15 |
instanceVariableNames:'port address'
|
|
16 |
classVariableNames:''
|
|
17 |
poolDictionaries:''
|
|
18 |
category:'OS-Sockets'
|
|
19 |
!
|
|
20 |
|
|
21 |
!AppletalkSocketAddress class methodsFor:'documentation'!
|
|
22 |
|
|
23 |
copyright
|
|
24 |
"
|
|
25 |
COPYRIGHT (c) 1999 by eXept Software AG
|
|
26 |
All Rights Reserved
|
|
27 |
|
|
28 |
This software is furnished under a license and may be used
|
|
29 |
only in accordance with the terms of that license and with the
|
|
30 |
inclusion of the above copyright notice. This software may not
|
|
31 |
be provided or otherwise made available to, or used by, any
|
|
32 |
other person. No title to or ownership of the software is
|
|
33 |
hereby transferred.
|
|
34 |
"
|
|
35 |
|
|
36 |
!
|
|
37 |
|
|
38 |
documentation
|
|
39 |
"
|
|
40 |
Instances of AppletalkSocketAddress represent appletalk socket addresses.
|
|
41 |
These consist of a network (2 bytes), a node (1 byte) and a port number.
|
|
42 |
|
|
43 |
|
|
44 |
[author:]
|
|
45 |
Claus Gittinger (cg@exept)
|
|
46 |
|
|
47 |
[see also:]
|
|
48 |
|
|
49 |
[instance variables:]
|
|
50 |
|
|
51 |
[class variables:]
|
|
52 |
"
|
|
53 |
! !
|
|
54 |
|
|
55 |
!AppletalkSocketAddress class methodsFor:'queries'!
|
|
56 |
|
|
57 |
hostAddressByName: hostName
|
|
58 |
^ Socket appletalkAddressOfHost:hostName
|
|
59 |
|
|
60 |
"
|
|
61 |
AppletalkSocketAddress hostAddressByName:'clam'
|
|
62 |
AppletalkSocketAddress hostAddressByName:'foobar'
|
|
63 |
"
|
|
64 |
|
|
65 |
|
|
66 |
!
|
|
67 |
|
|
68 |
hostNameByAddress:anAddress
|
|
69 |
^ Socket hostWithAppletalkAddress:anAddress
|
|
70 |
|
|
71 |
"
|
|
72 |
AppletalkSocketAddress hostNameByAddress:#[1 2 3].
|
|
73 |
"
|
|
74 |
|
|
75 |
! !
|
|
76 |
|
|
77 |
!AppletalkSocketAddress methodsFor:'queries'!
|
|
78 |
|
|
79 |
hostAddress:anAddress
|
|
80 |
address := anAddress
|
|
81 |
|
|
82 |
!
|
|
83 |
|
|
84 |
hostName
|
|
85 |
^ Socket hostWithAppletalkAddress:address
|
|
86 |
|
|
87 |
|
|
88 |
!
|
|
89 |
|
|
90 |
net
|
|
91 |
^ address wordAt:1 MSB:true
|
|
92 |
|
|
93 |
|
|
94 |
!
|
|
95 |
|
|
96 |
net:aNodeAddress
|
|
97 |
address isNil ifTrue:[
|
|
98 |
address := ByteArray new:3
|
|
99 |
].
|
|
100 |
address at:3 put:aNodeAddress
|
|
101 |
|
|
102 |
|
|
103 |
!
|
|
104 |
|
|
105 |
node
|
|
106 |
^ address at:3
|
|
107 |
|
|
108 |
|
|
109 |
!
|
|
110 |
|
|
111 |
port
|
|
112 |
^ port
|
|
113 |
|
|
114 |
!
|
|
115 |
|
|
116 |
portOrName
|
|
117 |
^ port
|
|
118 |
|
|
119 |
! !
|
|
120 |
|
|
121 |
!AppletalkSocketAddress class methodsFor:'documentation'!
|
|
122 |
|
|
123 |
version
|
|
124 |
^ '$Header: /cvs/stx/stx/libbasic2/AppletalkSocketAddress.st,v 1.1 1999-09-20 23:53:08 cg Exp $'
|
|
125 |
! !
|