Returns an array containing all the NSConnection
objects known to the system. These connections will
be valid at the time that the array was created, but may
be invalidated by other threads before you get to
examine the array.
Returns an NSConnection object whose send port is
that of the NSConnection registered under
name on host.
The nameserver server is used to look up the
send port to be used for the connection. Use
[NSSocketPortNameServer +sharedInstance]
for connections to remote hosts.
If host is nil or an empty
string, the host is taken to be the local
machine. If it is an asterisk ('*') then
the nameserver checks all hosts on the local subnet
(unless the nameserver is one that only manages
local ports). In the GNUstep implementation,
the local host is searched before any other hosts.
NB. if the nameserver does not support
connections to remote hosts (the default
situation) the host argeument should be
omitted.
If no NSConnection can be found for name and
host host, the method returns
nil.
The returned object has the default NSConnection of
the current thread as its parent (it has the same
receive port as the default connection).
Returns the default connection for a thread.
Creates a new instance if necessary. The
default connection has a single NSPort object used
for both sending and receiving - this it can't be used
to connect to a remote process, but can be used to vend
objects. Possible problem - if the
connection is invalidated, it won't be cleaned
up until this thread calls this method again. The
connection and it's ports could hang around for
a very long time.
Sets the NSConnection configuration so that multiple
threads may use the connection to send requests to
the remote connection. This option is inherited
by child connections. NB. A connection with
multiple threads enabled will run slower than a
normal connection.
Initialises an NSConnection with the receive
port r and the send port s.
Behavior varies with the port values as
follows -
r is nil
The NSConnection is released and the method returns
nil.
s is nil
The NSConnection uses r as the send port
as well as the receive port.
s is the same as r
The NSConnection is usable only for vending
objects.
A connection with the same ports exists
The new connection is released and the old
connection is retained and returned.
A connection with the same ports (swapped) exists
The new connection is initialised as normal, and
will communicate with the old connection.
If a connection exists whose send and receive ports
are both the same as the new connections receive
port, that existing connection is deemed to be the
parent of the new connection. The new connection
inherits configuration information from the
parent, and the delegate of the parent has a
chance to adjust the configuration of the new
connection or veto its creation.
NSConnectionDidInitializeNotification
is posted once a new connection is initialised.
Marks the receiving NSConnection as invalid.
Removes the NSConnections ports from any run loops.
Posts an NSConnectionDidDieNotification.
Invalidates all remote objects and local
proxies.
Returns an array of all the local objects that have
proxies at the remote end of the connection because
they have been sent over the connection and not yet
released by the far end.
Registers the receive port of the NSConnection as
name and unregisters the previous value
(if any). Returns YES on success,
NO on failure. On failure, the
connection remains registered under the previous
name. Supply nil as
name to unregister the NSConnection.
Returns the timeout interval used when waiting for
a reply to a request sent on the NSConnection. This value
is inherited from the parent connection or may be set
using the
-setReplyTimeout:
method. The default value is the maximum
delay (effectively infinite).
Returns the timeout interval used when trying to
send a request on the NSConnection. This value is
inherited from the parent connection or may be
set using the
-setRequestTimeout:
method. The default value is the maximum
delay (effectively infinite).
Returns the object that is made available by this
connection or by its parent (the object is
associated with the receive port).
Returns nil if no root object has been
set.
Returns the proxy for the root object of the remote
NSConnection. Generally you will wish
to call
[NSDistantObject -setProtocolForProxy:]
immediately after obtaining such a root proxy.
Sets the NSConnection's delegate (without retaining
it). The delegate is able to control some of
the NSConnection's behavior by implementing methods in
an informal protocol.
Sets whether or not the NSConnection should handle
requests arriving from the remote NSConnection
atomically. By default, this is set to
NO... if set to YES then
any messages arriving while one message is being dealt
with, will be queued. NB. careful - use of
this option can cause deadlocks.
Sets the time interval that the NSConnection will wait
for a reply for one of its requests before raising an
NSPortTimeoutException. NB.
In GNUstep you may also get such an exception if the
connection becomes invalidated while waiting for
a reply to a request.
This category represents an informal protocol to which
NSConnection delegates may conform... These
methods are not actually implemented by NSObject, so
implementing these methods in your class has the
effect documented.
This is not an NSConnection method, but is a method
that may be implemented by the delegate of an
NSConnection object.
If the delegate implements this method, the
NSConnection will invoke the method for
every message request or reply it receives from the
remote NSConnection. The delegate should use the
authentication data to check all the
NSData objects in the components array
(ignoring NSPort objects), and return
YES if they are valid,
NO otherwise.
If the method returns NO then an
NSFailedAuthentication exception
will be raised.
In GNUstep the components array is mutable,
allowing you to replace the NSData objects with
your own version.
This is not an NSConnection method, but is a method
that may be implemented by the delegate of an
NSConnection object.
If the delegate implements this method, the
NSConnection will invoke the method for
every message request to reply it sends to the
remote NSConnection. The delegate should generate
authentication data by examining all the
NSData objects in the components array
(ignoring NSPort objects), and return the
authentication data that can be used by
the remote NSConnection.
If the method returns nil then an
NSGenericException exception will be
raised.
In GNUstep the components array is mutable,
allowing you to replace the NSData objects with
your own version.
This is not an NSConnection method, but is a method
that may be implemented by the delegate of an
NSConnection object.
If the delegate implements this method, it will be
called whenever a new NSConnection is created that
has this NSConnection as its parent. The
delegate may take this opportunity to adjust the
configuration of the new connection and may
return a boolean value to tell the
parent whether the creation of the new
connection is to be permitted or not.