author | Claus Gittinger <cg@exept.de> |
Tue, 26 Feb 2008 11:29:14 +0100 | |
changeset 1930 | 935b2870be2e |
parent 1333 | d9ebcc42524c |
child 3953 | 9f54ddb6d684 |
permissions | -rw-r--r-- |
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 |
||
1162
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
14 |
"{ Package: 'stx:libbasic2' }" |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
15 |
|
818 | 16 |
SocketAddress variableByteSubclass:#AppletalkSocketAddress |
1162
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
17 |
instanceVariableNames:'' |
815 | 18 |
classVariableNames:'' |
19 |
poolDictionaries:'' |
|
1167 | 20 |
category:'OS-Sockets' |
815 | 21 |
! |
22 |
||
23 |
!AppletalkSocketAddress class methodsFor:'documentation'! |
|
24 |
||
25 |
copyright |
|
26 |
" |
|
27 |
COPYRIGHT (c) 1999 by eXept Software AG |
|
28 |
All Rights Reserved |
|
29 |
||
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
||
38 |
! |
|
39 |
||
40 |
documentation |
|
41 |
" |
|
42 |
Instances of AppletalkSocketAddress represent appletalk socket addresses. |
|
43 |
These consist of a network (2 bytes), a node (1 byte) and a port number. |
|
44 |
||
45 |
||
46 |
[author:] |
|
47 |
Claus Gittinger (cg@exept) |
|
48 |
||
49 |
[see also:] |
|
50 |
||
51 |
[instance variables:] |
|
52 |
||
53 |
[class variables:] |
|
54 |
" |
|
55 |
! ! |
|
56 |
||
1162
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
57 |
!AppletalkSocketAddress class methodsFor:'addressing'! |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
58 |
|
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
59 |
anyNet |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
60 |
|
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
61 |
^ 0 |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
62 |
! |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
63 |
|
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
64 |
anyNode |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
65 |
|
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
66 |
^ 0 |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
67 |
! |
818 | 68 |
|
1162
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
69 |
anyPort |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
70 |
|
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
71 |
^ 0 |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
72 |
! |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
73 |
|
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
74 |
firstUnreservedPort |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
75 |
|
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
76 |
^ 128 |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
77 |
! |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
78 |
|
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
79 |
maxPort |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
80 |
|
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
81 |
^ 254 "254 is only legal on localtalk" |
818 | 82 |
! ! |
83 |
||
1162
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
84 |
!AppletalkSocketAddress class methodsFor:'queries'! |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
85 |
|
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
86 |
domainSymbol |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
87 |
|
1226
0114bd044aa9
vw compatible domainSymbols (afXXX)
Claus Gittinger <cg@exept.de>
parents:
1167
diff
changeset
|
88 |
^ #'AF_APPLETALK' |
0114bd044aa9
vw compatible domainSymbols (afXXX)
Claus Gittinger <cg@exept.de>
parents:
1167
diff
changeset
|
89 |
! |
0114bd044aa9
vw compatible domainSymbols (afXXX)
Claus Gittinger <cg@exept.de>
parents:
1167
diff
changeset
|
90 |
|
0114bd044aa9
vw compatible domainSymbols (afXXX)
Claus Gittinger <cg@exept.de>
parents:
1167
diff
changeset
|
91 |
obsoleteDomainSymbol |
1162
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
92 |
^ #appletalk |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
93 |
! |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
94 |
|
1228
b766b9873ba6
refactored & dead code eliminated
Claus Gittinger <cg@exept.de>
parents:
1226
diff
changeset
|
95 |
vwDomainSymbol |
b766b9873ba6
refactored & dead code eliminated
Claus Gittinger <cg@exept.de>
parents:
1226
diff
changeset
|
96 |
^ #afAppletalk |
1162
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
97 |
! ! |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
98 |
|
818 | 99 |
!AppletalkSocketAddress methodsFor:'accessing'! |
815 | 100 |
|
101 |
net |
|
1162
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
102 |
^ self unsignedShortAt:4 bigEndian:true |
815 | 103 |
! |
104 |
||
105 |
net:aNodeAddress |
|
1162
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
106 |
self unsignedShortAt:4 put:aNodeAddress bigEndian:true |
818 | 107 |
|
108 |
" |
|
109 |
self new net:16r1234 |
|
110 |
" |
|
111 |
! |
|
112 |
||
113 |
net:netNr node:nodeNr port:portNr |
|
114 |
self |
|
115 |
net:netNr; |
|
116 |
node:nodeNr; |
|
117 |
port:portNr |
|
118 |
||
119 |
" |
|
120 |
AppletalkSocketAddress new net:1234 node:10 port:20 |
|
121 |
" |
|
122 |
" |
|
123 |
AppletalkSocketAddress hostAddress:#[1 2 3] port:10 |
|
124 |
" |
|
125 |
! |
|
126 |
||
127 |
node |
|
1162
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
128 |
^ self at:6 |
815 | 129 |
! |
130 |
||
818 | 131 |
node:aNodeNr |
1162
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
132 |
self at:6 put:aNodeNr |
815 | 133 |
! |
134 |
||
135 |
port |
|
1162
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
136 |
^ self at:3 |
815 | 137 |
! |
138 |
||
818 | 139 |
port:aPortNr |
1162
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
140 |
self at:3 put:aPortNr |
818 | 141 |
! ! |
142 |
||
143 |
!AppletalkSocketAddress methodsFor:'printing & storing'! |
|
144 |
||
1333 | 145 |
printAddressOn:aStream |
818 | 146 |
self net printOn:aStream. |
147 |
aStream nextPut:$:. |
|
148 |
self node printOn:aStream. |
|
149 |
! ! |
|
150 |
||
151 |
!AppletalkSocketAddress methodsFor:'queries'! |
|
152 |
||
815 | 153 |
portOrName |
1162
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
154 |
^ self port |
815 | 155 |
! ! |
156 |
||
157 |
!AppletalkSocketAddress class methodsFor:'documentation'! |
|
158 |
||
159 |
version |
|
1333 | 160 |
^ '$Header: /cvs/stx/stx/libbasic2/AppletalkSocketAddress.st,v 1.10 2003-10-17 16:42:59 penk Exp $' |
815 | 161 |
! ! |