Sets the methods known to be handled by the receiver to those in a given protocol.
- macOS 10.0–10.13Deprecated
The protocol for the receiver.
Setting a protocol for a remote proxy reduces network traffic needed to determine method argument and return types.
In order to encode a message’s arguments for transmission over the network, the types of those arguments must be known in advance. When they’re not known, the distributed objects system must send an initial message just to get those types, doubling the network traffic for every new message sent. Setting a protocol alleviates this need for methods defined by the protocol. You can still send messages that aren’t declared in
a—in this case the initial message is sent to determine the types, and then the real message is sent.