File: inet.html

package info (click to toggle)
tom 1.1.1-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 6,340 kB
  • ctags: 2,244
  • sloc: objc: 27,863; ansic: 9,804; sh: 7,411; yacc: 3,377; lex: 966; asm: 208; makefile: 62; cpp: 10
file content (266 lines) | stat: -rw-r--r-- 10,738 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
<html><head><title>File too/inet</title></head>
<body BGCOLOR="#ffffff" TEXT="#000000" LINK="#000000" VLINK="#000000">
<h1>File too/inet</h1>
<hr><h2>class <a href="index.html">too</a>.<a name="InetAddress" href="#i_InetAddress">InetAddress</a></h2>
An <b><code><a href="inet.html#InetAddress">InetAddress</a></b></code> really is an IPv4 address.  It depends on the
    underlying IPv6 implementation if this class is usable for IPv6
    addresses.
<h3>Inherits</h3>
<dl>
<dt>State supers
<dd><a href="../tom/index.html">tom</a>.<a href="../tom/State.html#State">State</a>, <a href="network.html#Address">Address</a>
</dl>
<h3>methods</h3>
<dl><dt><b><pre>instance (id)
  with (<a href="inet.html#InetHost">InetHost</a>, pointer, int) (h, a, l);
</pre></b><dd>
Return a new instance with the indicated fields.  (The <code>address</code>
    will be deallocated upon the death of the newly created address.)

<p></dl><h2>instance <a href="index.html">too</a>.<a name="i_InetAddress" href="#InetAddress">InetAddress</a></h2>
<h3>variables</h3>
<dl>
<dt><b><code>
<a href="inet.html#InetHost">InetHost</a> host;</code></b>
<dd>The host on which this address resides.

<dt><b><code>
pointer address;</code></b>
<dd>The internet address.

<dt><b><code>
int address_length;</code></b>
<dd>The length in bytes of the address.

</dl>
<h3>methods</h3>
<dl><dt><b><pre>(pointer, int)
  osAddress;
</pre></b><dd>
Return the low-level bare address.
<p><dt><b><pre>void
  dealloc;
</pre></b><dd>
Undocumented.
<p><dt><b><pre>boolean
  equal id other;
</pre></b><dd>
Undocumented.
<p><dt><b><pre>int
  hash;
</pre></b><dd>
Undocumented.
<p><dt><b><pre><a href="inet.html#InetHost">InetHost</a>
  host;
</pre></b><dd>
Return the host of this address.  The host is looked up if the
    address was not yet related to a host.
<p><dt><b><pre>protected id
  init (<a href="inet.html#InetHost">InetHost</a>, pointer, int) (h, a, l);
</pre></b><dd>
Designated initializer.
<p><dt><b><pre><a href="../tom/index.html">tom</a>.<a href="../tom/streams.html#OutputStream">OutputStream</a>
  write <a href="../tom/index.html">tom</a>.<a href="../tom/streams.html#OutputStream">OutputStream</a> s;
</pre></b><dd>
Output the address in dotted decimal octet notation.
<p></dl><hr><h2>class <a href="index.html">too</a>.<a name="InetHost" href="#i_InetHost">InetHost</a></h2>
<h3>Inherits</h3>
<dl>
<dt>State supers
<dd><a href="../tom/index.html">tom</a>.<a href="../tom/State.html#State">State</a>, <a href="network.html#Host">Host</a>
</dl>
<h3>variables</h3>
<dl>
<dt><b><code>
static <a href="../tom/index.html">tom</a>.<a href="../tom/Dictionary.html#MutableDictionary">MutableDictionary</a> hosts_by_name;</code></b>
<dd>All internet hosts currently known, keyed on their name(s).

<dt><b><code>
static <a href="../tom/index.html">tom</a>.<a href="../tom/Dictionary.html#MutableDictionary">MutableDictionary</a> hosts_by_addr;</code></b>
<dd>All internet hosts currently known, keyed on their address(es).

<dt><b><code>
static <a href="inet.html#InetHost">InetHost</a> local_host_any;</code></b>
<dd>The wildcard local host.

</dl>
<h3>methods</h3>
<dl><dt><b><pre>instance (id)
  addressed <a href="inet.html#InetAddress">InetAddress</a> addr;
</pre></b><dd>
Return the host known with the address <code>addr</code>.  If the host can be
    found in the cache, no lookup is performed.
<p><dt><b><pre>protected void
  cacheHost instance (id) h;
</pre></b><dd>
Add the host <code>h</code> to the cache.
<p><dt><b><pre>void
  initialize;
</pre></b><dd>
Undocumented.
<p><dt><b><pre>void
  load <a href="../tom/index.html">tom</a>.<a href="../tom/Array.html#Array">Array</a> arguments;
</pre></b><dd>
Undocumented.
<p><dt><b><pre>instance (id)
  named <a href="../tom/index.html">tom</a>.<a href="../tom/String.html#String">String</a> name;
</pre></b><dd>
Return the host named <code>name</code>.  If the host can be found in the
    cache, no lookup is performed.
<p><dt><b><pre>protected instance (id)
  hostWithAddress <a href="inet.html#InetAddress">InetAddress</a> addr;
</pre></b><dd>
Perform a lookup of the host addressed <code>addr</code>.  Return the host, or
    <code>nil</code> if it could not be found.  The cache remains unaffected.
<p><dt><b><pre>protected instance (id)
  hostWithName <a href="../tom/index.html">tom</a>.<a href="../tom/String.html#String">String</a> name;
</pre></b><dd>
Perform a lookup of the host named <code>name</code>.  Return the host, or
    <code>nil</code> if it could not be found.  The cache remains unaffected.
<p><dt><b><pre>protected instance (id)
  with (<a href="../tom/index.html">tom</a>.<a href="../tom/Array.html#Array">Array</a>, <a href="../tom/index.html">tom</a>.<a href="../tom/Array.html#Array">Array</a>) (n, a);
</pre></b><dd>
Return a newly allocated host with the names <code>n</code> and addresses <code>a</code>.

<p></dl><h2>instance <a href="index.html">too</a>.<a name="i_InetHost" href="#InetHost">InetHost</a></h2>
<h3>variables</h3>
<dl>
<dt><b><code>
public <a href="../tom/index.html">tom</a>.<a href="../tom/Array.html#Array">Array</a> names;</code></b>
<dd>The names by which this host is known.

<dt><b><code>
public <a href="../tom/index.html">tom</a>.<a href="../tom/Array.html#Array">Array</a> addresses;</code></b>
<dd>The addresses by which this host is known.

</dl>
<h3>methods</h3>
<dl><dt><b><pre>id
  init (<a href="../tom/index.html">tom</a>.<a href="../tom/Array.html#Array">Array</a>, <a href="../tom/index.html">tom</a>.<a href="../tom/Array.html#Array">Array</a>) (n, a);
</pre></b><dd>
Designated initializer.
<p><dt><b><pre><a href="../tom/index.html">tom</a>.<a href="../tom/String.html#String">String</a>
  name;
</pre></b><dd>
Undocumented.
<p></dl><hr><h2>class <a href="index.html">too</a>.<a name="InetPort" href="#i_InetPort">InetPort</a></h2>
An <b><code><a href="inet.html#InetPort">InetPort</a></b></code> is an abstract port on an internet host.
<h3>Inherits</h3>
<dl>
<dt>State supers
<dd><a href="ports.html#Port">Port</a>, <a href="../tom/index.html">tom</a>.<a href="../tom/State.html#State">State</a>
</dl>
<h3>methods</h3>
<dl><dt><b><pre>instance (id)
  with int port
    at <a href="inet.html#InetAddress">InetAddress</a> address;
</pre></b><dd>
Return a newly created <b><code><a href="inet.html#InetPort">InetPort</a></b></code> with the <code>address</code> and the <code>port</code>.

<p></dl><h2>instance <a href="index.html">too</a>.<a name="i_InetPort" href="#InetPort">InetPort</a></h2>
<h3>variables</h3>
<dl>
<dt><b><code>
public <a href="inet.html#InetAddress">InetAddress</a> address;</code></b>
<dd>The address (of the host) at which this port resides.

<dt><b><code>
public int port;</code></b>
<dd>The port on the host.

</dl>
<h3>methods</h3>
<dl><dt><b><pre>boolean
  equal id other;
</pre></b><dd>
Undocumented.
<p><dt><b><pre>int
  hash;
</pre></b><dd>
Undocumented.
<p><dt><b><pre>protected id
  initWithPort int p
            at <a href="inet.html#InetAddress">InetAddress</a> a;
</pre></b><dd>
Designated initializer.
<p><dt><b><pre><a href="../tom/index.html">tom</a>.<a href="../tom/streams.html#OutputStream">OutputStream</a>
  write <a href="../tom/index.html">tom</a>.<a href="../tom/streams.html#OutputStream">OutputStream</a> s;
</pre></b><dd>
Output the address in dotted decimal octet notation followed by a
    colon and the port number.
<p></dl><hr><h2>class <a href="index.html">too</a>.<a name="ConnectedInetPort" href="#i_ConnectedInetPort">ConnectedInetPort</a></h2>
A <b><code><a href="inet.html#ConnectedInetPort">ConnectedInetPort</a></b></code> is a bytestream on a connected TCP socket.

<h3>Inherits</h3>
<dl>
<dt>State supers
<dd><a href="ports.html#ConnectedPort">ConnectedPort</a>, <a href="inet.html#InetPort">InetPort</a>
</dl>
<h2>instance <a href="index.html">too</a>.<a name="i_ConnectedInetPort" href="#ConnectedInetPort">ConnectedInetPort</a></h2>
<h3>variables</h3>
<dl>
<dt><b><code>
public <a href="inet.html#InetPort">InetPort</a> server;</code></b>
<dd>Description of the server to which we connected or from which we
    accepted.  In the latter case, this will be a <b><code><a href="inet.html#ServerInetPort">ServerInetPort</a></b></code>.

<dt><b><code>
<a href="inet.html#InetPort">InetPort</a> peer;</code></b>
<dd>The peer socket.  Set by invoking <code>InetPort [self peer]</code>.

</dl>
<h3>methods</h3>
<dl><dt><b><pre>protected id
  initWithPort int p
            at <a href="inet.html#InetAddress">InetAddress</a> a;
</pre></b><dd>
Designated initializer.  Connect to the port <code>p</code> at the address <code>a</code>.

<p><dt><b><pre>id
  initWithPort int p
            at <a href="inet.html#InetAddress">InetAddress</a> a
    descriptor int d
        server <a href="inet.html#ServerInetPort">ServerInetPort</a> s
          peer <a href="inet.html#InetPort">InetPort</a> pr;
</pre></b><dd>
Initialization used by `ConnectedInetPort [ServerInetPort accept]'.

<p><dt><b><pre><a href="inet.html#InetPort">InetPort</a>
  peer;
</pre></b><dd>
Return the peer port.
<p><dt><b><pre>void
  registerForRead <a href="DescriptorDelegate.html#DescriptorReadDelegate">DescriptorReadDelegate</a> d;
</pre></b><dd>
Undocumented.
<p><dt><b><pre>void
  registerForWrite <a href="DescriptorDelegate.html#DescriptorWriteDelegate">DescriptorWriteDelegate</a> d;
</pre></b><dd>
Undocumented.
<p></dl><hr><h2>class <a href="index.html">too</a>.<a name="ServerInetPort" href="#i_ServerInetPort">ServerInetPort</a></h2>
A <b><code><a href="inet.html#ServerInetPort">ServerInetPort</a></b></code> is a TCP port which is listening for connections
    to accept.
<h3>Inherits</h3>
<dl>
<dt>State supers
<dd><a href="inet.html#InetPort">InetPort</a>, <a href="ports.html#ServerPort">ServerPort</a>, <a href="../tom/index.html">tom</a>.<a href="../tom/Descriptor.html#Descriptor">Descriptor</a>
</dl>
<h2>instance <a href="index.html">too</a>.<a name="i_ServerInetPort" href="#ServerInetPort">ServerInetPort</a></h2>
<h3>methods</h3>
<dl><dt><b><pre><a href="inet.html#ConnectedInetPort">ConnectedInetPort</a>
  accept;
</pre></b><dd>
Accept a connection on the receiving port, returning a connected
    port.
<p><dt><b><pre>protected id
  initWithPort int port
            at <a href="inet.html#InetAddress">InetAddress</a> address;
</pre></b><dd>
Designated initializer.  Listen on the <code>port</code> at the <code>address</code>.  If
    the <code>address</code> is <code>nil</code>, any local address will do; if the port is 0,
    it is assigned by the operating system.
<p><dt><b><pre>void
  registerForRead <a href="DescriptorDelegate.html#DescriptorReadDelegate">DescriptorReadDelegate</a> d;
</pre></b><dd>
Undocumented.
<p></dl><hr><address>Generated by tm 1.01.</address></body></html>