author | Claus Gittinger <cg@exept.de> |
Wed, 08 May 2019 14:41:45 +0200 | |
changeset 4942 | 9f424bed67c4 |
parent 4143 | 320bddcd2606 |
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 |
" |
|
3953 | 12 |
"{ Package: 'stx:libbasic2' }" |
815 | 13 |
|
3953 | 14 |
"{ NameSpace: Smalltalk }" |
1162
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 |
[author:] |
|
46 |
Claus Gittinger (cg@exept) |
|
47 |
||
48 |
[see also:] |
|
49 |
||
50 |
[instance variables:] |
|
51 |
||
52 |
[class variables:] |
|
53 |
" |
|
54 |
! ! |
|
55 |
||
1162
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
56 |
!AppletalkSocketAddress class methodsFor:'addressing'! |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
57 |
|
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
58 |
anyNet |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
59 |
|
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
60 |
^ 0 |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
61 |
! |
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 |
anyNode |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
64 |
|
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
65 |
^ 0 |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
66 |
! |
818 | 67 |
|
1162
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
68 |
anyPort |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
69 |
|
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
70 |
^ 0 |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
71 |
! |
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 |
firstUnreservedPort |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
74 |
|
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
75 |
^ 128 |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
76 |
! |
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 |
maxPort |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
79 |
|
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
80 |
^ 254 "254 is only legal on localtalk" |
818 | 81 |
! ! |
82 |
||
1162
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
83 |
!AppletalkSocketAddress class methodsFor:'queries'! |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
84 |
|
3953 | 85 |
domain |
1162
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
86 |
|
1226
0114bd044aa9
vw compatible domainSymbols (afXXX)
Claus Gittinger <cg@exept.de>
parents:
1167
diff
changeset
|
87 |
^ #'AF_APPLETALK' |
0114bd044aa9
vw compatible domainSymbols (afXXX)
Claus Gittinger <cg@exept.de>
parents:
1167
diff
changeset
|
88 |
! |
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 |
obsoleteDomainSymbol |
1162
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
91 |
^ #appletalk |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
92 |
! |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
93 |
|
1228
b766b9873ba6
refactored & dead code eliminated
Claus Gittinger <cg@exept.de>
parents:
1226
diff
changeset
|
94 |
vwDomainSymbol |
b766b9873ba6
refactored & dead code eliminated
Claus Gittinger <cg@exept.de>
parents:
1226
diff
changeset
|
95 |
^ #afAppletalk |
1162
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
96 |
! ! |
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
97 |
|
818 | 98 |
!AppletalkSocketAddress methodsFor:'accessing'! |
815 | 99 |
|
100 |
net |
|
1162
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
101 |
^ self unsignedShortAt:4 bigEndian:true |
815 | 102 |
! |
103 |
||
104 |
net:aNodeAddress |
|
1162
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
105 |
self unsignedShortAt:4 put:aNodeAddress bigEndian:true |
818 | 106 |
|
107 |
" |
|
108 |
self new net:16r1234 |
|
109 |
" |
|
110 |
! |
|
111 |
||
112 |
net:netNr node:nodeNr port:portNr |
|
113 |
self |
|
114 |
net:netNr; |
|
115 |
node:nodeNr; |
|
116 |
port:portNr |
|
117 |
||
118 |
" |
|
119 |
AppletalkSocketAddress new net:1234 node:10 port:20 |
|
120 |
" |
|
121 |
" |
|
122 |
AppletalkSocketAddress hostAddress:#[1 2 3] port:10 |
|
123 |
" |
|
124 |
! |
|
125 |
||
126 |
node |
|
1162
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
127 |
^ self at:6 |
815 | 128 |
! |
129 |
||
818 | 130 |
node:aNodeNr |
1162
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
131 |
self at:6 put:aNodeNr |
815 | 132 |
! |
133 |
||
134 |
port |
|
1162
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
135 |
^ self at:3 |
815 | 136 |
! |
137 |
||
818 | 138 |
port:aPortNr |
1162
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
139 |
self at:3 put:aPortNr |
818 | 140 |
! ! |
141 |
||
142 |
!AppletalkSocketAddress methodsFor:'printing & storing'! |
|
143 |
||
1333 | 144 |
printAddressOn:aStream |
818 | 145 |
self net printOn:aStream. |
146 |
aStream nextPut:$:. |
|
147 |
self node printOn:aStream. |
|
148 |
! ! |
|
149 |
||
150 |
!AppletalkSocketAddress methodsFor:'queries'! |
|
151 |
||
815 | 152 |
portOrName |
1162
c8ba14f81f13
Prepare new socketb implementation
Stefan Vogel <sv@exept.de>
parents:
818
diff
changeset
|
153 |
^ self port |
815 | 154 |
! ! |
155 |
||
156 |
!AppletalkSocketAddress class methodsFor:'documentation'! |
|
157 |
||
158 |
version |
|
3953 | 159 |
^ '$Header$' |
815 | 160 |
! ! |
3953 | 161 |