---
title: Stream.PropertyKey
framework: foundation
role: symbol
role_heading: Structure
path: foundation/stream/propertykey
---

# Stream.PropertyKey

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

## Declaration

```swift
struct PropertyKey
```

## Topics

### Type Properties

- [dataWrittenToMemoryStreamKey](foundation/stream/propertykey/datawrittentomemorystreamkey.md)
- [fileCurrentOffsetKey](foundation/stream/propertykey/filecurrentoffsetkey.md)
- [networkServiceType](foundation/stream/propertykey/networkservicetype.md)
- [socketSecurityLevelKey](foundation/stream/propertykey/socketsecuritylevelkey.md)
- [socksProxyConfigurationKey](foundation/stream/propertykey/socksproxyconfigurationkey.md)

### Initializers

- [init(_:)](foundation/stream/propertykey/init(_:).md)
- [init(rawValue:)](foundation/stream/propertykey/init(rawvalue:).md)

## Relationships

### Conforms To

- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Constants

- [Stream.Status](foundation/stream/status.md)
- [Stream Status Constants](foundation/stream_status_constants.md)
- [Stream.Event](foundation/stream/event.md)
- [StreamNetworkServiceTypeValue](foundation/streamnetworkservicetypevalue.md)
- [StreamSOCKSProxyConfiguration](foundation/streamsocksproxyconfiguration.md)
- [StreamSOCKSProxyVersion](foundation/streamsocksproxyversion.md)
- [StreamSocketSecurityLevel](foundation/streamsocketsecuritylevel.md)
- [NSStreamSocketSSLErrorDomain](foundation/nsstreamsocketsslerrordomain.md)
- [NSStreamSOCKSErrorDomain](foundation/nsstreamsockserrordomain.md)
