Available in iOS 4.0 and later
NSStreamDelegate protocol defines the optional methods implemented by delegates of
The delegate receives this message when a given event has occurred on a given stream.
optional func stream(_
theStream: NSStream, handleEvent
The stream on which
The stream event that occurred.
The delegate receives this message only if
theStreamis scheduled on a run loop. The message is sent on the stream object’s thread. The delegate should examine
streamEventto determine the appropriate action it should take.
Available in iOS 2.0 and later
Available as part of an informal protocol prior to iOS 4.0