delegate
Sets the receiver’s delegate.
Declaration
unowned(unsafe) var delegate: (any StreamDelegate)? { get set }Parameters
- delegate:
The delegate for the receiver.
Discussion
By default, a stream is its own delegate, and subclasses of NSInputStream and NSOutputStream must maintain this contract. If you override this method in a subclass, passing nil must restore the receiver as its own delegate. Delegates are not retained.
To learn about delegates and delegation, read “Delegation” in Cocoa Fundamentals Guide.