![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /proc/self/root/usr/share/doc/gnustep-base-doc/Base/Reference/ |
Upload File : |
<!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>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 </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: </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: onHost: </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 </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: </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: onHost: </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: forName: </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: </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 </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: onHost: </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 ('*') 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: forName: </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: </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>