NSStream defines these string constants as keys for accessing stream properties using property(forKey:) and setting properties with setProperty(_:forKey:):


struct PropertyKey


Type Properties

static let dataWrittenToMemoryStreamKey: Stream.PropertyKey

Value is an NSData instance containing the data written to a memory stream.

static let fileCurrentOffsetKey: Stream.PropertyKey

Value is an NSNumber object containing the current absolute offset of the stream.

static let networkServiceType: Stream.PropertyKey

The type of service for the stream. Providing the service type allows the system to properly handle certain attributes of the stream, including routing and suspension behavior. Most streams do not need to set this property. See Stream Service Types for a list of possible values.

static let socksProxyConfigurationKey: Stream.PropertyKey

Value is an NSDictionary object containing SOCKS proxy configuration information.