equal
deleted
inserted
replaced
12 |
12 |
13 SocketAddress subclass:#IPSocketAddress |
13 SocketAddress subclass:#IPSocketAddress |
14 instanceVariableNames:'port address' |
14 instanceVariableNames:'port address' |
15 classVariableNames:'' |
15 classVariableNames:'' |
16 poolDictionaries:'' |
16 poolDictionaries:'' |
17 category:'Compatibility-ST80' |
17 category:'OS-Sockets' |
18 ! |
18 ! |
19 |
19 |
20 !IPSocketAddress class methodsFor:'documentation'! |
20 !IPSocketAddress class methodsFor:'documentation'! |
21 |
21 |
22 copyright |
22 copyright |
59 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
59 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
60 SUCH DAMAGE. |
60 SUCH DAMAGE. |
61 " |
61 " |
62 ! ! |
62 ! ! |
63 |
63 |
64 !IPSocketAddress class methodsFor:'instance creation'! |
|
65 |
|
66 hostAddress:addr port:portNr |
|
67 ^ self basicNew |
|
68 hostAddress:addr port:portNr |
|
69 ! ! |
|
70 |
|
71 !IPSocketAddress class methodsFor:'queries'! |
64 !IPSocketAddress class methodsFor:'queries'! |
72 |
65 |
73 hostAddressByName: hostName |
66 hostAddressByName: hostName |
74 ^ Socket ipAddressOfHost:hostName |
67 ^ Socket ipAddressOfHost:hostName |
75 |
68 |
86 |addr| |
79 |addr| |
87 |
80 |
88 addr := IPSocketAddress hostAddressByName:'porty'. |
81 addr := IPSocketAddress hostAddressByName:'porty'. |
89 IPSocketAddress hostNameByAddress:addr |
82 IPSocketAddress hostNameByAddress:addr |
90 " |
83 " |
|
84 ! |
|
85 |
|
86 servicePortByName:serviceName |
|
87 ^ Socket portOfService:serviceName |
|
88 |
|
89 " |
|
90 IPSocketAddress servicePortByName:'nntp' |
|
91 IPSocketAddress servicePortByName:'time' |
|
92 " |
91 ! ! |
93 ! ! |
92 |
94 |
93 !IPSocketAddress methodsFor:'accessing'! |
95 !IPSocketAddress methodsFor:'accessing'! |
94 |
96 |
95 hostAddress:addr port:portNr |
97 hostAddress:addr port:portNr |
96 address := addr. |
98 address := addr. |
97 port := portNr |
99 port := portNr |
|
100 ! |
|
101 |
|
102 hostName:name port:portNr |
|
103 address := Socket ipAddressOfHost:name. |
|
104 port := portNr |
|
105 |
|
106 " |
|
107 IPSocketAddress hostName:'exept' port:10 |
|
108 " |
98 ! ! |
109 ! ! |
99 |
110 |
100 !IPSocketAddress methodsFor:'printing & storing'! |
111 !IPSocketAddress methodsFor:'printing & storing'! |
101 |
112 |
102 printOn:aStream |
113 printOn:aStream |
141 ! ! |
152 ! ! |
142 |
153 |
143 !IPSocketAddress class methodsFor:'documentation'! |
154 !IPSocketAddress class methodsFor:'documentation'! |
144 |
155 |
145 version |
156 version |
146 ^ '$Header: /cvs/stx/stx/libbasic2/IPSocketAddress.st,v 1.8 1999-09-02 15:18:11 cg Exp $' |
157 ^ '$Header: /cvs/stx/stx/libbasic2/IPSocketAddress.st,v 1.9 1999-09-20 23:52:58 cg Exp $' |
147 ! ! |
158 ! ! |