This file is indexed.

/usr/share/GNUstep/Documentation/Developer/Base/Reference/NSPortNameServer.html is in gnustep-base-doc 1.24.7-1build2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

    <head>
    <title>NSPortNameServer class reference</title>
  </head>
  <body>
    <font face="serif">
    <a href="Base.html">Up</a>
    <br />
    <h1><a name="title$NSPortNameServer">NSPortNameServer class reference</a></h1>
    <h3>Authors</h3>
    <dl>
      <dt>Richard Frith-Macdonald (<a href="mailto:richard@brainstorm.co.uk"><code>richard@brainstorm.co.uk</code></a>)</dt>
      <dd>
      </dd>
    </dl>
    <p><b>Version:</b> 37003</p>
    <p><b>Date:</b> 2013-08-22 16:44:54 +0100 (Thu, 22 Aug 2013)</p>
    <p><b>Copyright:</b> (C) 1998,1999,2003 Free Software Foundation, Inc.</p>

        <div>
      <hr width="50%" align="left" />
      <h3>Contents -</h3>
      <ol>
        <li>
          <a href="#001000000000">Software documentation for the NSMessagePortNameServer
        class</a>
        </li>
        <li>
          <a href="#002000000000">Software documentation for the NSPortNameServer class</a>
        </li>
        <li>
          <a href="#003000000000">Software documentation for the NSSocketPortNameServer
        class</a>
        </li>
      </ol>
      <hr width="50%" align="left" />
    </div>

          <h1><a name="001000000000">
        Software documentation for the NSMessagePortNameServer
        class
      </a></h1>
    <h2><a name="class$NSMessagePortNameServer">NSMessagePortNameServer</a> : <a rel="gsdoc" href="#class$NSPortNameServer">NSPortNameServer</a></h2>
    <blockquote class="declared">
      <dl>
        <dt><b>Declared in:</b></dt>
        <dd>Foundation/NSPortNameServer.h</dd>
      </dl>
    </blockquote>
    <div class="availability">
<b>Availability:</b> MacOS-X 10.0.0</div>
<br />
    <div class="desc">
      
          Subclass of
          <a rel="gsdoc" href="#class$NSPortNameServer">NSPortNameServer</a>

            taking/returning instances of
            <a rel="gsdoc" href="NSPort.html#class$NSMessagePort">NSMessagePort</a>

              . Port removal functionality is not supported; if you
              want to cancel a service, you have to destroy the
              port (invalidate the
              <a rel="gsdoc" href="NSPort.html#class$NSMessagePort">NSMessagePort</a>

                given to
                <a rel="gsdoc" href="#method$NSPortNameServer-registerPort$forName$">[NSPortNameServer -registerPort:forName:]</a>
).
        
    </div>
    <b>Method summary</b>
    <ul>
      <li><a rel="gsdoc" href="NSPortNameServer.html#method$NSMessagePortNameServer+sharedInstance">+sharedInstance</a></li>
      <li><a rel="gsdoc" href="NSPortNameServer.html#method$NSMessagePortNameServer-portForName$">-portForName:</a></li>
      <li><a rel="gsdoc" href="NSPortNameServer.html#method$NSMessagePortNameServer-portForName$onHost$">-portForName:onHost:</a></li>
    </ul>
    <hr width="50%" align="left" />
<div class="method">
    <h3><a name="method$NSMessagePortNameServer+sharedInstance">sharedInstance&nbsp;</a></h3>
    + (id) <b>sharedInstance</b>;<br />
    <div class="availability">
<b>Availability:</b> MacOS-X 10.0.0</div>
<br />
    <div class="desc">
      
            Obtain single instance for this host.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSMessagePortNameServer-portForName$">portForName:&nbsp;</a></h3>
    - (<a rel="gsdoc" href="NSPort.html#class$NSPort">NSPort</a>*) <b>portForName:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)name;<br />
    <div class="availability">
<b>Availability:</b> MacOS-X 10.0.0</div>
<br />
    <div class="desc">
      
            Returns the
            <a rel="gsdoc" href="NSPort.html#class$NSMessagePort">NSMessagePort</a>

              instance registered for the specified
              <var>name</var> if it exists on the local host.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSMessagePortNameServer-portForName$onHost$">portForName:&nbsp;onHost:&nbsp;</a></h3>
    - (<a rel="gsdoc" href="NSPort.html#class$NSPort">NSPort</a>*) <b>portForName:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)name<b> onHost:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)host;<br />
    <div class="availability">
<b>Availability:</b> MacOS-X 10.0.0</div>
<br />
    <div class="desc">
      
            Returns the port registered for the specified
            <var>name</var> (if it exists). <br /> The
            <var>host</var> must be an empty string or
            <code>nil</code>, since
            <a rel="gsdoc" href="NSPort.html#class$NSMessagePort">NSMessagePort</a>

              instances on other hosts are inaccessible from
              the current <var>host</var>.
          
    </div>
    <hr width="25%" align="left" />
</div>

          <h1><a name="002000000000">
        Software documentation for the NSPortNameServer class
      </a></h1>
    <h2><a name="class$NSPortNameServer">NSPortNameServer</a> : <a rel="gsdoc" href="NSObject.html#class$NSObject">NSObject</a></h2>
    <blockquote class="declared">
      <dl>
        <dt><b>Declared in:</b></dt>
        <dd>Foundation/NSPortNameServer.h</dd>
      </dl>
    </blockquote>
    <div class="availability">
<b>Availability:</b> MacOS-X 10.0.0</div>
<br />
    <div class="desc">
      
          The abstract port name server class. This defines an API
          for working with port name servers... objects used to
          manage access to ports in the distributed objects
          system (see
          <a rel="gsdoc" href="NSConnection.html#class$NSConnection">NSConnection</a>

            ).
        
    </div>
    <b>Method summary</b>
    <ul>
      <li><a rel="gsdoc" href="NSPortNameServer.html#method$NSPortNameServer+systemDefaultPortNameServer">+systemDefaultPortNameServer</a></li>
      <li><a rel="gsdoc" href="NSPortNameServer.html#method$NSPortNameServer-portForName$">-portForName:</a></li>
      <li><a rel="gsdoc" href="NSPortNameServer.html#method$NSPortNameServer-portForName$onHost$">-portForName:onHost:</a></li>
      <li><a rel="gsdoc" href="NSPortNameServer.html#method$NSPortNameServer-registerPort$forName$">-registerPort:forName:</a></li>
      <li><a rel="gsdoc" href="NSPortNameServer.html#method$NSPortNameServer-removePortForName$">-removePortForName:</a></li>
    </ul>
    <hr width="50%" align="left" />
<div class="method">
    <h3><a name="method$NSPortNameServer+systemDefaultPortNameServer">systemDefaultPortNameServer&nbsp;</a></h3>
    + (id) <b>systemDefaultPortNameServer</b>;<br />
    <div class="availability">
<b>Availability:</b> MacOS-X 10.0.0</div>
<br />
    <div class="desc">
      
            
    </p>
    <p>

              Returns the default port name server for the
              process. <br /> This is a nameserver for
              host-local connections private to the current
              user. If you with to create public connections or
              connections to other hosts, you must use
              <a rel="gsdoc" href="#method$NSSocketPortNameServer+sharedInstance">[NSSocketPortNameServer +sharedInstance]</a>
 instead.
                </p>
    <p>
      
            This default behavior may be altered by setting the
            <code>NSPortIsMessagePort</code> user default to
            <code>NO</code>, in which case an
            <a rel="gsdoc" href="#class$NSSocketPortNameServer">NSSocketPortNameServer</a>

              will be used as the default system name server and
              you will have to use
              <a rel="gsdoc" href="#method$NSMessagePortNameServer+sharedInstance">[NSMessagePortNameServer +sharedInstance]</a>
 for host-local, private connections.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSPortNameServer-portForName$">portForName:&nbsp;</a></h3>
    - (<a rel="gsdoc" href="NSPort.html#class$NSPort">NSPort</a>*) <b>portForName:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)name;<br />
    <div class="availability">
<b>Availability:</b> MacOS-X 10.0.0</div>
<br />
    <div class="desc">
      
            Looks up the port with the specified <var>name</var>
            on the local host and returns it or <code>nil</code> if
            no port is found with that <var>name</var>. <br />
            Different nameservers have different namespaces
            appropriate to the type of port they deal with,
            so failing to find a named port with one nameserver does
            not guarantee that a port does with that
            <var>name</var> does not exist. <br /> This is a
            convenience method calling
            <a rel="gsdoc" href="#method$NSPortNameServer-portForName$onHost$">
              -portForName:onHost:
            </a>

            with a <code>nil</code> host argument.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSPortNameServer-portForName$onHost$">portForName:&nbsp;onHost:&nbsp;</a></h3>
    - (<a rel="gsdoc" href="NSPort.html#class$NSPort">NSPort</a>*) <b>portForName:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)name<b> onHost:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)host;<br />
    <div class="availability">
<b>Availability:</b> MacOS-X 10.0.0</div>
<br />
Subclasses <strong>must</strong> override this method.<br />
    <div class="desc">
      
            Looks up the port with the specified <var>name</var>
            on <var>host</var> and returns it or <code>nil</code> if
            no port is found with that <var>name</var>. <br />
            Different nameservers have different namespaces
            appropriate to the type of port they deal with,
            so failing to find a named port with one nameserver does
            not guarantee that a port does with that
            <var>name</var> does not exist.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSPortNameServer-registerPort$forName$">registerPort:&nbsp;forName:&nbsp;</a></h3>
    - (BOOL) <b>registerPort:</b> (<a rel="gsdoc" href="NSPort.html#class$NSPort">NSPort</a>*)port<b> forName:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)name;<br />
    <div class="availability">
<b>Availability:</b> MacOS-X 10.0.0</div>
<br />
Subclasses <strong>must</strong> override this method.<br />
    <div class="desc">
      
            Registers <var>port</var> with the supplied
            <var>name</var>, so that other processes can look it
            up to contact it. A <var>port</var> may be registered
            with more than one <var>name</var> by making multiple
            calls to this method. <br /> Returns <code>YES</code>
            on success, <code>NO</code> otherwise. <br /> The common
            cause for failure is that another <var>port</var> is
            already registered with the <var>name</var>. Raises
            NSInvalidArgumentException if
            given bad arguments.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSPortNameServer-removePortForName$">removePortForName:&nbsp;</a></h3>
    - (BOOL) <b>removePortForName:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)name;<br />
    <div class="availability">
<b>Availability:</b> MacOS-X 10.0.0</div>
<br />
Subclasses <strong>must</strong> override this method.<br />
    <div class="desc">
      
            Removes any port registration for the supplied
            <var>name</var> (whether registered in the current
            process or another). <br /> The common cause for
            failure is that no port is registered with the
            <var>name</var>. <br /> Raises
            NSInvalidArgumentException if
            given bad arguments.
          
    </div>
    <hr width="25%" align="left" />
</div>

          <h1><a name="003000000000">
        Software documentation for the NSSocketPortNameServer
        class
      </a></h1>
    <h2><a name="class$NSSocketPortNameServer">NSSocketPortNameServer</a> : <a rel="gsdoc" href="#class$NSPortNameServer">NSPortNameServer</a></h2>
    <blockquote class="declared">
      <dl>
        <dt><b>Declared in:</b></dt>
        <dd>Foundation/NSPortNameServer.h</dd>
      </dl>
    </blockquote>
    <div class="availability">
<b>Availability:</b> MacOS-X 10.0.0</div>
<br />
    <div class="desc">
      
          This is the nameserver handling ports used for
          distributed objects communications (see
          <a rel="gsdoc" href="NSConnection.html#class$NSConnection">NSConnection</a>

            ) between hosts. <br /> Use the
            <a rel="gsdoc" href="#method$NSSocketPortNameServer+sharedInstance">[NSSocketPortNameServer +sharedInstance]</a>
 method to get a nameserver, rather than allocating and initialising one.
        
    </div>
    <hr width="50%" align="left" />
    <a href="#_NSSocketPortNameServer_ivars">Instance Variables</a>
    <br/><br/>
    <b>Method summary</b>
    <ul>
      <li><a rel="gsdoc" href="NSPortNameServer.html#method$NSSocketPortNameServer+sharedInstance">+sharedInstance</a></li>
      <li><a rel="gsdoc" href="NSPortNameServer.html#method$NSSocketPortNameServer-portForName$onHost$">-portForName:onHost:</a></li>
      <li><a rel="gsdoc" href="NSPortNameServer.html#method$NSSocketPortNameServer-registerPort$forName$">-registerPort:forName:</a></li>
      <li><a rel="gsdoc" href="NSPortNameServer.html#method$NSSocketPortNameServer-removePortForName$">-removePortForName:</a></li>
    </ul>
    <hr width="50%" align="left" />
<div class="method">
    <h3><a name="method$NSSocketPortNameServer+sharedInstance">sharedInstance&nbsp;</a></h3>
    + (id) <b>sharedInstance</b>;<br />
    <div class="availability">
<b>Availability:</b> MacOS-X 10.0.0</div>
<br />
    <div class="desc">
      
            Returns the shared name server object for
            <a rel="gsdoc" href="NSPort.html#class$NSSocketPort">NSSocketPort</a>

              objects.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSSocketPortNameServer-portForName$onHost$">portForName:&nbsp;onHost:&nbsp;</a></h3>
    - (<a rel="gsdoc" href="NSPort.html#class$NSPort">NSPort</a>*) <b>portForName:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)name<b> onHost:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)host;<br />
    <div class="availability">
<b>Availability:</b> MacOS-X 10.0.0</div>
<br />
    <div class="desc">
      
            Concrete implementation of
            <a rel="gsdoc" href="#method$NSPortNameServer-portForName$onHost$">[NSPortNameServer -portForName:onHost:]</a>
 <br /> Looks up and returns a port with the specified <var>name</var> and <var>host</var>. <br /> If <var>host</var> is <code>nil</code> or an empty string, this performs a lookup for a port on the current <var>host</var>. <br /> If <var>host</var> is an asterisk (&apos;*&apos;) then the lookup returns the first port found with the specified <var>name</var> on any machine on the local network. <br /> Returns <code>nil</code> if no matching port could be found.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSSocketPortNameServer-registerPort$forName$">registerPort:&nbsp;forName:&nbsp;</a></h3>
    - (BOOL) <b>registerPort:</b> (<a rel="gsdoc" href="NSPort.html#class$NSPort">NSPort</a>*)port<b> forName:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)name;<br />
    <div class="availability">
<b>Availability:</b> MacOS-X 10.0.0</div>
<br />
    <div class="desc">
      
            Concrete implementation of
            <a rel="gsdoc" href="#method$NSPortNameServer-registerPort$forName$">[NSPortNameServer -registerPort:forName:]</a>
 <br /> Registers the <var>port</var> with the specified <var>name</var> such that it is available on all the IP addresses of the host on which the process is running. <br /> Returns <code>YES</code> on success, <code>NO</code> on failure (eg the <var>name</var> is already in use or there is a problem registering for some reason).
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSSocketPortNameServer-removePortForName$">removePortForName:&nbsp;</a></h3>
    - (BOOL) <b>removePortForName:</b> (<a rel="gsdoc" href="NSString.html#class$NSString">NSString</a>*)name;<br />
    <div class="availability">
<b>Availability:</b> MacOS-X 10.0.0</div>
<br />
    <div class="desc">
      
            Concrete implementation of
            <a rel="gsdoc" href="#method$NSPortNameServer-removePortForName$">[NSPortNameServer -removePortForName:]</a>
 <br /> Unregisters the specified <var>name</var> from any associated port on the local host. <br /> Returns <code>YES</code> on success, <code>NO</code> on failure.
          
    </div>
    <hr width="25%" align="left" />
</div>
<a name="_NSSocketPortNameServer_ivars"/>    <br/><hr width="50%" align="left" />
    <h2>Instance Variables for NSSocketPortNameServer Class</h2>
    <h3><a name="ivariable$NSSocketPortNameServer*_nameMap">_nameMap</a></h3>
    @protected NSMapTable* <b>_nameMap</b>;<br />
    <div class="availability">
<b>Availability:</b> MacOS-X 10.0.0</div>
<br />
    <div class="desc">
      
            <em>Warning</em> the underscore at the start of the
            name of this instance variable indicates that, even
            though it is not technically <em>private</em>, it is
            intended for internal use within the package, and
            you should not use the variable in other code.
          
    </div>
    <hr width="25%" align="left" />
    <h3><a name="ivariable$NSSocketPortNameServer*_portMap">_portMap</a></h3>
    @protected NSMapTable* <b>_portMap</b>;<br />
    <div class="availability">
<b>Availability:</b> MacOS-X 10.0.0</div>
<br />
    <div class="desc">
      
            <em>Warning</em> the underscore at the start of the
            name of this instance variable indicates that, even
            though it is not technically <em>private</em>, it is
            intended for internal use within the package, and
            you should not use the variable in other code.
          
    </div>
    <hr width="25%" align="left" />
    <br/><hr width="50%" align="left" /><br/>
    <br />
    <a href="Base.html">Up</a>
    </font>
</body>
</html>