---
title: StreamSocketSecurityLevel
framework: foundation
role: symbol
role_heading: Structure
path: foundation/streamsocketsecuritylevel
---

# StreamSocketSecurityLevel

NSStream defines these string constants for specifying the secure-socket layer (SSL) security level.

## Declaration

```swift
struct StreamSocketSecurityLevel
```

## Discussion

Discussion You access and set these values using the NSStreamSocketSecurityLevelKey property key.

## Topics

### Type Properties

- [negotiatedSSL](foundation/streamsocketsecuritylevel/negotiatedssl.md)
- [none](foundation/streamsocketsecuritylevel/none.md)
- [ssLv2](foundation/streamsocketsecuritylevel/sslv2.md)
- [ssLv3](foundation/streamsocketsecuritylevel/sslv3.md)
- [tlSv1](foundation/streamsocketsecuritylevel/tlsv1.md)

### Initializers

- [init(rawValue:)](foundation/streamsocketsecuritylevel/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)
- [Stream.PropertyKey](foundation/stream/propertykey.md)
- [NSStreamSocketSSLErrorDomain](foundation/nsstreamsocketsslerrordomain.md)
- [NSStreamSOCKSErrorDomain](foundation/nsstreamsockserrordomain.md)
