![]() 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 : /usr/share/doc/gnustep-base-doc/Base/Reference/ |
Upload File : |
<?xml version="1.0"?> <!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.4//EN" "http://www.gnustep.org/gsdoc-1_0_4.dtd"> <gsdoc base="NSPortCoder" up="Base"> <head> <title>NSPortCoder class reference</title> <author name="Andrew Kachites McCallum"> <email address="mccallum@gnu.ai.mit.edu"> mccallum@gnu.ai.mit.edu </email> </author> <copy>1997,2000 Free Software Foundation, Inc.</copy> </head> <body> <front><contents /></front> <chapter> <heading> Software documentation for the NSPortCoder class </heading> <class name="NSPortCoder" super="NSCoder" ovadd="1.0.0"> <declared>Foundation/NSPortCoder.h</declared> <desc> This class is an <ref type="class" id="NSCoder">NSCoder</ref> implementation specialized for sending objects over network connections for immediate use (as opposed to the archivers which persist objects for reconstitution after an indefinite term). It is used to help implement the distributed objects framework by the <ref type="class" id="NSConnection">NSConnection</ref> class. Even for highly specialized applications, you probably do not need to use this class directly. </desc> <method type="NSPortCoder*" factory="yes" ovadd="1.0.0"> <sel>portCoderWithReceivePort:</sel> <arg type="NSPort*">recv</arg> <sel>sendPort:</sel> <arg type="NSPort*">send</arg> <sel>components:</sel> <arg type="NSArray*">comp</arg> <desc> Create a new instance for communications over <var>send</var> and <var>recv</var>, and <var>send</var> an initial message through <var>send</var> as specified by <var>comp</var>. </desc> </method> <method type="NSConnection*" ovadd="1.0.0"> <sel>connection</sel> <desc> Returns the <code>NSConnection</code> using this instance. </desc> </method> <method type="NSPort*" ovadd="1.0.0"> <sel>decodePortObject</sel> <desc> Return port object previously encoded by this instance. Mainly for use by the ports themselves. </desc> </method> <method type="void" ovadd="1.0.0"> <sel>dispatch</sel> <desc> Processes and acts upon the initial message the receiver was initialized with.. </desc> </method> <method type="void" ovadd="1.0.0"> <sel>encodePortObject:</sel> <arg type="NSPort*">aPort</arg> <desc> Encodes <var>aPort</var> so it can be sent to the receiving side of the connection. Mainly for use by the ports themselves. </desc> </method> <method type="id" ovadd="1.0.0"> <sel>initWithReceivePort:</sel> <arg type="NSPort*">recv</arg> <sel>sendPort:</sel> <arg type="NSPort*">send</arg> <sel>components:</sel> <arg type="NSArray*">comp</arg> <desc> Initialize a new instance for communications over <var>send</var> and <var>recv</var>, and <var>send</var> an initial message through <var>send</var> as specified by <var>comp</var>. </desc> </method> <method type="BOOL" ovadd="1.0.0"> <sel>isBycopy</sel> <desc> Returns <code>YES</code> if receiver is in the process of encoding objects by copying them (rather than substituting a proxy). This method is mainly needed internally and by subclasses. </desc> </method> <method type="BOOL" ovadd="1.0.0"> <sel>isByref</sel> <desc> Returns <code>YES</code> if receiver will substitute a proxy when encoding objects rather than by copying them. This method is mainly needed internally and by subclasses. </desc> </method> </class> </chapter> <chapter> <heading> Software documentation for the NSObject(NSPortCoder) category </heading> <category name="NSPortCoder" class="NSObject" ovadd="1.0.0"> <declared>Foundation/NSPortCoder.h</declared> <desc> This informal protocol allows an object to control the details of how an object is sent over the wire in distributed objects Port communications. </desc> <method type="Class" ovadd="1.0.0"> <sel>classForPortCoder</sel> <desc> Must return the class that will be created on the remote side of the connection. If the class to be created is not the same as that of the object returned by replacementObjectForPortCoder: then the class must be capable of recognising the object it actually gets in its initWithCoder: method. The default operation is to return NSDistantObject unless the object is being sent bycopy, in which case the objects actual class is returned. To force bycopy operation the object should return its own class. <br /> Override to substitute class when an instance is being serialized by an <ref type="class" id="NSPortCoder">NSPortCoder</ref> . Default implementation returns <ref type="method" id="-classForCoder"> -classForCoder </ref> . </desc> </method> <method type="id" ovadd="1.0.0"> <sel>replacementObjectForPortCoder:</sel> <arg type="NSPortCoder*">aCoder</arg> <desc> This message is sent to an object about to be encoded for sending over the wire. The default action is to return an NSDistantObject which is a local proxy for the object unless the object is being sent bycopy, in which case the actual object is returned. To force bycopy, an object should return itself. <br /> Returns the actual object to be encoded for sending over the network on a Distributed Objects connection. <br /> The default implementation returns self if the receiver is being sent <em>bycopy</em> and returns a proxy otherwise. <br /> Subclasses may override this method to change this behavior, eg. to ensure that they are always copied. </desc> </method> </category> </chapter> </body> </gsdoc>